区点 | JIS | SJIS | +0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 | +A | +B | +C | +D | +E | +F |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13区 | 2D20 | 873F | ① | ② | ③ | ④ | ⑤ | ⑥ | ⑦ | ⑧ | ⑨ | ⑩ | ⑪ | ⑫ | ⑬ | ⑭ | ⑮ | |
2D30 | 874F | ⑯ | ⑰ | ⑱ | ⑲ | ⑳ | Ⅰ | Ⅱ | Ⅲ | Ⅳ | Ⅴ | Ⅵ | Ⅶ | Ⅷ | Ⅸ | Ⅹ | ||
2D40 | 875F | ㍉ | ㌔ | ㌢ | ㍍ | ㌘ | ㌧ | ㌃ | ㌶ | ㍑ | ㍗ | ㌍ | ㌦ | ㌣ | ㌫ | ㍊ | ㌻ | |
2D50 | 876F | ㎜ | ㎝ | ㎞ | ㎎ | ㎏ | ㏄ | ㎡ | ㍻ | |||||||||
2D60 | 8780 | 〝 | 〟 | № | ㏍ | ℡ | ㊤ | ㊥ | ㊦ | ㊧ | ㊨ | ㈱ | ㈲ | ㈹ | ㍾ | ㍽ | ㍼ | |
2D70 | 8790 | ≒ | ≡ | ∫ | ∮ | ∑ | √ | ⊥ | ∠ | ∟ | ⊿ | ∵ | ∩ | ∪ |
libiconvxxx/lib/目录下的jisx0208.h文件
增加代码:
/* *Windows的机种依存文字 PC-9800系列等,NEC的电脑在日本主流的时候曾独自被定义了文字13区分配。 **/ static const unsigned short jisx0208_2uni_page2D[96] = { /* 0x2D20 - 0x2D2F */ 0xfffd, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, /* 0x2D30 - 0x2D3F */ 0x246F, 0x2470, 0x2471, 0x2472, 0x2473, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0xfffd, /* 0x2D40 - 0x2D4F */ 0x3349, 0x3314, 0x3322, 0x334D, 0x3318, 0x3327, 0x3303, 0x3336, 0x3351, 0x3357, 0x330D, 0x3326, 0x3323, 0x332B, 0x334A, 0x333B, /* 0x2D50 - 0x2D5F */ 0x339C, 0x339D, 0x339E, 0x338E, 0x338F, 0x33C4, 0x33A1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x337B, /* 0x2D60 - 0x2D6F */ 0x301D, 0x301F, 0x2116, 0x33CD, 0x2121, 0x32A4, 0x32A5, 0x32A6, 0x32A7, 0x32A8, 0x3231, 0x3232, 0x3239, 0x337E, 0x337D, 0x337C, /* 0x2D70 - 0x2D7F */ 0x2252, 0x2261, 0x222B, 0x222E, 0x2211, 0x221A, 0x22A5, 0x2220, 0x221F, 0x22BF, 0x2235, 0x2229, 0x222A, 0xfffd, 0xfffd, 0xfffd };
static int jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { unsigned char c1 = s[0]; /* 增加jp 对 [Windows的机种依存文字] 解码的支持*/ if (c1 == 0x2D) { if (n >= 2) { unsigned char c2 = s[1]; if (c2 >= 0x20 && c2 < 0x7F) { unsigned int i = (c2 - 0x20); unsigned short wc = jisx0208_2uni_page2D[i]; *pwc = (ucs4_t) wc; return 2; } return RET_ILSEQ; } return RET_TOOFEW(0); } /* end */ if ((c1 >= 0x21 && c1 <= 0x28) || (c1 >= 0x30 && c1 <= 0x74)) { if (n >= 2) { unsigned char c2 = s[1]; if (c2 >= 0x21 && c2 < 0x7f) { unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21); unsigned short wc = 0xfffd; if (i < 1410) { if (i < 690) wc = jisx0208_2uni_page21[i]; } else { if (i < 7808) wc = jisx0208_2uni_page30[i-1410]; } if (wc != 0xfffd) { *pwc = (ucs4_t) wc; return 2; } } return RET_ILSEQ; } return RET_TOOFEW(0); } return RET_ILSEQ; }