summaryrefslogtreecommitdiff
path: root/src/xutf8/ucs2fontmap.c
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-11-28 18:55:50 +0000
committerManolo Gouy <Manolo>2010-11-28 18:55:50 +0000
commitf4fc4241b7ae71c1ca7d39b835055e68ae16e08e (patch)
tree4abc70b332c8503ab424a2ebcffbe930513a5bce /src/xutf8/ucs2fontmap.c
parentdcfdf8be20bff349c1a7a54d6b4d079d91bf540e (diff)
STR #2155: fixed using sparkaround's patch conditional to use of configure --enable-cp936
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7902 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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;
};