summaryrefslogtreecommitdiff
path: root/src/xutf8/ucs2fontmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xutf8/ucs2fontmap.c')
-rw-r--r--src/xutf8/ucs2fontmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xutf8/ucs2fontmap.c b/src/xutf8/ucs2fontmap.c
index f1b966981..37f74d701 100644
--- a/src/xutf8/ucs2fontmap.c
+++ b/src/xutf8/ucs2fontmap.c
@@ -37,6 +37,7 @@ typedef struct {
} Summary16;
+#include "lcUniConv/cp936ext.h"
#include "lcUniConv/big5.h"
#include "lcUniConv/gb2312.h"
#include "lcUniConv/iso8859_10.h"
@@ -295,6 +296,11 @@ int ucs2fontmap(char *s, unsigned int ucs, int enc) {
return 24;
}
break;
+ case 26: /* gbk/cp936ext */
+ if (cp936ext_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+ return 26;
+ }
+ break;
default:
break;
};
@@ -363,6 +369,8 @@ int encoding_number(const char *enc) {
return 24;
} else if (!strcmp(enc, "iso8859-11")) {
return 25;
+ } else if (!strcmp(enc, "gbk-0") || !strcmp(enc, "cp936") || !strcmp(enc, "gbk")) {
+ return 26;
};
return -1;
};