diff options
Diffstat (limited to 'nx-X11/lib/X11/lcUTF8Load.c')
-rw-r--r-- | nx-X11/lib/X11/lcUTF8Load.c | 15 |
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; |