Add support for big5 encoding.

This commit is contained in:
allstars.chh 2013-02-28 08:39:27 +08:00
parent 9e2bf0f8ce
commit 27d114bd11

View File

@ -415,7 +415,9 @@ var CMapConverterList = {
'90ms-RKSJ-V': sjisToUnicode,
'90msp-RKSJ-H': sjisToUnicode,
'90msp-RKSJ-V': sjisToUnicode,
'GBK-EUC-H': gbkToUnicode
'GBK-EUC-H': gbkToUnicode,
'ETenms-B5-H': big5ToUnicode,
'ETenms-B5-V': big5ToUnicode,
};
// CMaps using Hankaku (Halfwidth) Latin glyphs instead of proportional one.
@ -468,6 +470,10 @@ function gbkToUnicode(str) {
return decodeBytes(stringToBytes(str), 'gbk');
}
function big5ToUnicode(str) {
return decodeBytes(stringToBytes(str), 'big5');
}
// Some characters, e.g. copyrightserif, mapped to the private use area and
// might not be displayed using standard fonts. Mapping/hacking well-known chars
// to the similar equivalents in the normal characters range.