summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/setrunelocale.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2003-06-01 15:30:56 +0000
committerache <ache@FreeBSD.org>2003-06-01 15:30:56 +0000
commit9952d232aa74941c556f56a086702b3f90b927a0 (patch)
tree16fe19ade2f3c43a76952fb0a373cdafd0d1f51f /lib/libc/locale/setrunelocale.c
parent8f1078dc32ccf55afc8de54c288b9c328da665f7 (diff)
downloadFreeBSD-src-9952d232aa74941c556f56a086702b3f90b927a0.zip
FreeBSD-src-9952d232aa74941c556f56a086702b3f90b927a0.tar.gz
Add GBK encoding
PR: 51504 Submitted by: Statue <statue@freebsd.sinica.edu.tw>
Diffstat (limited to 'lib/libc/locale/setrunelocale.c')
-rw-r--r--lib/libc/locale/setrunelocale.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index 9cfe8d6..cd5384b 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -50,9 +50,10 @@ extern int _none_init(_RuneLocale *);
extern int _UTF2_init(_RuneLocale *);
extern int _UTF8_init(_RuneLocale *);
extern int _EUC_init(_RuneLocale *);
+extern int _GBK_init(_RuneLocale *);
extern int _BIG5_init(_RuneLocale *);
extern int _MSKanji_init(_RuneLocale *);
-extern _RuneLocale *_Read_RuneMagi(FILE *);
+extern _RuneLocale *_Read_RuneMagi(FILE *);
int
setrunelocale(char *encoding)
@@ -135,6 +136,8 @@ setrunelocale(char *encoding)
ret = _UTF8_init(rl);
else if (strcmp(rl->encoding, "EUC") == 0)
ret = _EUC_init(rl);
+ else if (strcmp(rl->encoding, "GBK") == 0)
+ ret = _GBK_init(rl);
else if (strcmp(rl->encoding, "BIG5") == 0)
ret = _BIG5_init(rl);
else if (strcmp(rl->encoding, "MSKanji") == 0)
OpenPOWER on IntegriCloud