aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcUTF8Load.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-08-27 02:13:27 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-10 22:52:31 +0200
commit1baa27d098d5282cb942455f3f4a642ed21924d6 (patch)
tree847d62c0697667b143603e106348d90de24bb246 /nx-X11/lib/X11/lcUTF8Load.c
parentda3e7fd287d4d6c4e080fc230a567862431a565d (diff)
downloadnx-libs-1baa27d098d5282cb942455f3f4a642ed21924d6.tar.gz
nx-libs-1baa27d098d5282cb942455f3f4a642ed21924d6.tar.bz2
nx-libs-1baa27d098d5282cb942455f3f4a642ed21924d6.zip
update files from modules dir of libX11 1.3.4
Diffstat (limited to 'nx-X11/lib/X11/lcUTF8Load.c')
-rw-r--r--nx-X11/lib/X11/lcUTF8Load.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/nx-X11/lib/X11/lcUTF8Load.c b/nx-X11/lib/X11/lcUTF8Load.c
index 15165243b..82ea3b54d 100644
--- a/nx-X11/lib/X11/lcUTF8Load.c
+++ b/nx-X11/lib/X11/lcUTF8Load.c
@@ -1,4 +1,3 @@
-/* $TOG: $ */
/******************************************************************
Copyright 1993 by SunSoft, Inc.
@@ -50,13 +49,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;