From a03c488a188605660c346a591ac0c8dfdc9b1d3f Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Fri, 5 Jan 2001 06:20:31 +0000 Subject: kio8-* encoding improvement Submitted by: mi@aldan.algebra.com --- x11/kdelibs2/Makefile | 2 +- x11/kdelibs2/files/patch-charsets.conf | 37 ++++++++++++++ x11/kdelibs2/files/patch-kcharsets.cpp | 90 ++++++++++++++++++++++++++++++++++ x11/kdelibs3/Makefile | 2 +- x11/kdelibs4/Makefile | 2 +- 5 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 x11/kdelibs2/files/patch-charsets.conf create mode 100644 x11/kdelibs2/files/patch-kcharsets.cpp (limited to 'x11') diff --git a/x11/kdelibs2/Makefile b/x11/kdelibs2/Makefile index 317c388f9c6b..a2025a298f30 100644 --- a/x11/kdelibs2/Makefile +++ b/x11/kdelibs2/Makefile @@ -7,7 +7,7 @@ PORTNAME= kdelibs PORTVERSION= 2.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION}/distribution/tar/generic/src diff --git a/x11/kdelibs2/files/patch-charsets.conf b/x11/kdelibs2/files/patch-charsets.conf new file mode 100644 index 000000000000..90fa60181d48 --- /dev/null +++ b/x11/kdelibs2/files/patch-charsets.conf @@ -0,0 +1,37 @@ +diff -ur kdecore/charsets.config kdecore/charsets.config +--- kdecore/charsets.config Tue Oct 24 19:57:36 2000 ++++ kdecore/charsets.config Tue Oct 24 20:06:04 2000 +@@ -84,11 +84,15 @@ + iso-8859-13=iso 8859-13 + iso-8859-14=iso 8859-14 + iso-8859-15=iso 8859-15 ++paratype-cp154=pt 154 ++paratype-154=pt 154 ++pt-154=pt 154 + + # some different names for the encodings defined in the charmaps files. + # even though the charmap file names are all uppercase, the names are all lowercase here. + [aliases] + cp852=ibm852 ++microsoft-cp1251=cp1251 + + # some last resort hints in case the charmap file couldn't be found. This gives at least a partial conversion + # and helps making things readable. +@@ -106,3 +110,3 @@ + [charsetsForEncoding] +-koi8-r=koi8-r,iso-8859-5,koi8-u +-koi8-u=koi8-u,iso8859-5,koi8-r ++koi8-r=koi8-u,koi8-r,iso8859-5, ++koi8-u=koi8-u,iso8859-5,koi8-r +@@ -113,1 +117,1 @@ +-iso 8859-5=iso8859-5,koi8-r,koi8-u ++iso 8859-5=iso8859-5,koi8-u,koi8-r +@@ -126,1 +130,1 @@ +-cp 1251=koi8-r,iso8859-5 ++cp 1251=koi8-u,koi8-r,iso8859-5 +@@ -138,3 +142,4 @@ + big5=set-big5,unicode + gbk=set-gbk,unicode + euckr=euckr,unicode,iso8859-1 ++pt 154=unicode,pt154,cp1251 +\ No newline at end of file diff --git a/x11/kdelibs2/files/patch-kcharsets.cpp b/x11/kdelibs2/files/patch-kcharsets.cpp new file mode 100644 index 000000000000..c104c830da46 --- /dev/null +++ b/x11/kdelibs2/files/patch-kcharsets.cpp @@ -0,0 +1,90 @@ +diff -ur kdecore/kcharsets.cpp kdecore/kcharsets.cpp +--- kdecore/kcharsets.cpp Tue Oct 24 19:57:36 2000 ++++ kdecore/kcharsets.cpp Tue Oct 24 20:10:19 2000 +@@ -37,9 +37,9 @@ + template class QList; + + #if QT_VERSION > 220 +-#define CHARSETS_COUNT 30 ++#define CHARSETS_COUNT 32 + #else +-#define CHARSETS_COUNT 29 ++#define CHARSETS_COUNT 32 + #endif + + static const char * const charsetsStr[CHARSETS_COUNT] = { +@@ -60,6 +60,9 @@ + "iso-8859-14", + "iso-8859-15", + "koi8r", ++ "koi8u", ++ "cp1251", ++ "pt154", + "eucjp", + "euckr", + "set-th-th", +@@ -71,9 +74,6 @@ + "utf-8", + "utf-16", + "iso-8859-11", +-#if QT_VERSION > 220 +- "koi8u", +-#endif + "Any" + }; + +@@ -96,6 +96,9 @@ + "iso8859-14", + "iso8859-15", + "koi8-r", ++ "koi8-u", ++ "microsoft-cp1251", ++ "paratype-cp154", + "jisx0208.1983-0", + "ksc5601.1987-0", + "tis620.2533-1", +@@ -107,9 +110,6 @@ + "utf8", + "utf16", + "tis620-*", +-#if QT_VERSION > 220 +- "koi8-u", +-#endif + "" // this will always return true... + }; + +@@ -131,6 +131,9 @@ + QFont::ISO_8859_14, + QFont::ISO_8859_15, + QFont::KOI8R, ++ QFont::KOI8U, ++ QFont::CP_1251, ++ QFont::PT_154, + QFont::Set_Ja, + QFont::Set_Ko, + QFont::Set_Th_TH, +@@ -142,9 +145,6 @@ + QFont::Unicode, + QFont::Unicode, + QFont::ISO_8859_11, +-#if QT_VERSION > 220 +- QFont::KOI8U, +-#endif + QFont::AnyCharSet + }; + +@@ -536,10 +536,12 @@ + return "iso8859-15"; + case QFont::KOI8R: + return "koi8-r"; +-#if QT_VERSION > 220 + case QFont::KOI8U: + return "koi8-u"; +-#endif ++ case QFont::CP_1251: ++ return "microsoft-cp1251"; ++ case QFont::PT_154: ++ return "paratype-cp154"; + case QFont::Set_Ko: + return "ksc5601.1987-0"; + case QFont::Set_Ja: diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile index 317c388f9c6b..a2025a298f30 100644 --- a/x11/kdelibs3/Makefile +++ b/x11/kdelibs3/Makefile @@ -7,7 +7,7 @@ PORTNAME= kdelibs PORTVERSION= 2.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION}/distribution/tar/generic/src diff --git a/x11/kdelibs4/Makefile b/x11/kdelibs4/Makefile index 317c388f9c6b..a2025a298f30 100644 --- a/x11/kdelibs4/Makefile +++ b/x11/kdelibs4/Makefile @@ -7,7 +7,7 @@ PORTNAME= kdelibs PORTVERSION= 2.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION}/distribution/tar/generic/src -- cgit v1.2.3