summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/setrunelocale.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2003-07-29 07:52:44 +0000
committerache <ache@FreeBSD.org>2003-07-29 07:52:44 +0000
commit2ecc37e2533e5e47d49b7c048283bd8d1938cd0b (patch)
treeb6bddb229476d8c322b60efba79bc0763f215a52 /lib/libc/locale/setrunelocale.c
parent59cfaf22ea1a1861b05ed505c323bd562e4a4909 (diff)
downloadFreeBSD-src-2ecc37e2533e5e47d49b7c048283bd8d1938cd0b.zip
FreeBSD-src-2ecc37e2533e5e47d49b7c048283bd8d1938cd0b.tar.gz
Add support for gb18030 encoding
PR: 51729 Submitted by: Kang Liu <liukang@bjpu.edu.cn>
Diffstat (limited to 'lib/libc/locale/setrunelocale.c')
-rw-r--r--lib/libc/locale/setrunelocale.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index df899d4..9cdd7e7 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -54,6 +54,7 @@ extern int _none_init(_RuneLocale *);
extern int _UTF2_init(_RuneLocale *);
extern int _UTF8_init(_RuneLocale *);
extern int _EUC_init(_RuneLocale *);
+extern int _GB18030_init(_RuneLocale *);
extern int _GBK_init(_RuneLocale *);
extern int _BIG5_init(_RuneLocale *);
extern int _MSKanji_init(_RuneLocale *);
@@ -139,6 +140,8 @@ __setrunelocale(const char *encoding)
ret = _UTF8_init(rl);
else if (strcmp(rl->encoding, "EUC") == 0)
ret = _EUC_init(rl);
+ else if (strcmp(rl->encoding, "GB18030") == 0)
+ ret = _GB18030_init(rl);
else if (strcmp(rl->encoding, "GBK") == 0)
ret = _GBK_init(rl);
else if (strcmp(rl->encoding, "BIG5") == 0)
OpenPOWER on IntegriCloud