summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorStefan Dirsch <sndirsch@suse.de>2008-11-22 19:40:54 +0100
committerStefan Dirsch <sndirsch@suse.de>2008-11-22 19:40:54 +0100
commit67e34d7a82ccd31f1208c0c43a6d58c3c05bf51a (patch)
tree03aaeecce47d31236fd272cfc46bdb27b37d6a52 /modules
parent55782a0a1fe1560f1a9c0ed78bc7f2575c15abcf (diff)
Added remaining xlib patch required for gb18030 support (#1573).
Diffstat (limited to 'modules')
-rw-r--r--modules/lc/Utf8/lcUTF8Load.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/lc/Utf8/lcUTF8Load.c b/modules/lc/Utf8/lcUTF8Load.c
index f4bff28..19880f8 100644
--- a/modules/lc/Utf8/lcUTF8Load.c
+++ b/modules/lc/Utf8/lcUTF8Load.c
@@ -51,13 +51,21 @@ _XlcUtf8Loader(
return lcd;
/* The official IANA name for UTF-8 is "UTF-8" in upper case with a dash. */
- if (!XLC_PUBLIC_PART(lcd)->codeset ||
- (_XlcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "UTF-8"))) {
+ if (!XLC_PUBLIC_PART(lcd)->codeset) {
+ _XlcDestroyLC(lcd);
+ return (XLCd) NULL;
+ }
+ else if (!_XlcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "UTF-8")) {
+ _XlcAddUtf8LocaleConverters(lcd);
+ }
+ else if (!_XlcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "GB18030")) {
+ _XlcAddGB18030LocaleConverters(lcd);
+ }
+ else {
_XlcDestroyLC(lcd);
return (XLCd) NULL;
}
- _XlcAddUtf8LocaleConverters(lcd);
_XlcAddUtf8Converters(lcd);
return lcd;