1static const unsigned short sjis_mac2wchar1[] = {
20x339c, 0x339f, 0x339d, 0x33a0,
30x33a4, 0xff4d, 0x33a1, 0x33a5,
40x339e, 0x33a2, 0x338e, 0xff47,
50x338f, 0x33c4, 0x3396, 0x3397,
60x2113, 0x3398, 0x33b3, 0x33b2,
70x33b1, 0x33b0, 0x2109, 0x33d4,
80x33cb, 0x3390, 0x3385, 0x3386,
10static const unsigned short sjis_mac2wchar2[] = {
120x2121, 0xf861, 0x2664, 0x2667,
130x2661, 0x2662, 0x2660, 0x2663,
140x2665, 0x2666, 0x0000, 0x0000,
150x0000, 0x0000, 0x0000, 0x0000,
160x0000, 0x0000, 0x0000, 0x0000,
170x0000, 0x0000, 0x3020, 0x260e,
19static const unsigned short sjis_mac2wchar3[] = {
210x261d, 0x261f, 0x21c6, 0x21c4,
220x21c5, 0xf860, 0x21e8, 0x21e6,
230x21e7, 0x21e9, 0x21e8, 0x21e6,
25static const unsigned short sjis_mac2wchar4[] = {
260x3230, 0x322a, 0x322b, 0x322c,
270x322d, 0x322e, 0x322f, 0x3240,
280x3237, 0x3242, 0x3243, 0x3239,
290x323a, 0x3231, 0x323e, 0x3234,
300x3232, 0x323b, 0x3236, 0x3233,
310x3235, 0x323c, 0x323d, 0x323f,
33static const unsigned short sjis_mac2wchar5[] = {
340x5927, 0x5c0f, 0x32a4, 0x32a5,
350x32a6, 0x32a7, 0x32a8, 0x32a9,
360x3296, 0x329d, 0x3298, 0x329e,
370x63a7, 0x3299, 0x3349, 0x3322,
380x334d, 0x3314, 0x3316, 0x3305,
390x3333, 0x334e, 0x3303, 0x3336,
400x3318, 0x3315, 0x3327, 0x3351,
410x334a, 0x3339, 0x3357, 0x330d,
420x3342, 0x3323, 0x3326, 0x333b,
430x332b, 0x0000, 0x0000, 0x0000,
440x0000, 0x0000, 0x0000, 0x0000,
450x3300, 0x331e, 0x332a, 0x3331,
47static const unsigned short sjis_mac2wchar6[] = {
480x337e, 0x337d, 0x337c, 0x337b,
490x0000, 0x0000, 0x0000, 0x0000,
500x0000, 0x0000, 0x0000, 0x0000,
510x0000, 0x0000, 0x0000, 0x0000,
520x0000, 0x0000, 0x0000, 0x0000,
530x0000, 0x337f, 0xf862, 0xf862,
540x222e, 0x221f, 0x22bf, 0x0000,
550x0000, 0x0000, 0x0000, 0x0000,
560x0000, 0x0000, 0x0000, 0x0000,
570x0000, 0x0000, 0x0000, 0x0000,
580x0000, 0x0000, 0x0000, 0x0000,
590x301d, 0x301f, 0x0000, 0x0000,
600x0000, 0x0000, 0x0000, 0x0000,
610x0000, 0x0000, 0x0000, 0x0000,
620x0000, 0x0000, 0x0000, 0x0000,
630x0000, 0x0000, 0x0000, 0x0000,
640x3094, 0x0000, 0x30f7, 0x30f8,
66static const unsigned short sjis_mac2wchar7[] = {
670x3001, 0x3002, 0x0000,
680x0000, 0x0000, 0x0000, 0x0000,
690x0000, 0x0000, 0x0000, 0x0000,
700x0000, 0x0000, 0x0000, 0x0000,
710xffe3, 0xfe33, 0x0000, 0x0000,
720x0000, 0x0000, 0x0000, 0x0000,
730x0000, 0x0000, 0x0000, 0x30fc,
740xfe31, 0x2010, 0x0000, 0x0000,
750x301c, 0x2016, 0xff5c, 0x2026,
760xfe30, 0x0000, 0x0000, 0x0000,
770x0000, 0xfe35, 0xfe36, 0xfe39,
780xfe3a, 0xff3b, 0xff3d, 0xfe37,
790xfe38, 0xfe3f, 0xfe40, 0xfe3d,
800xfe3e, 0xfe41, 0xfe42, 0xfe43,
810xfe44, 0xfe3b, 0xfe3c, 0x0000,
820x0000, 0x0000, 0x0000, 0x0000,
84static const unsigned short sjis_mac2wchar8[] = {
860x3043, 0x0000, 0x3045, 0x0000,
870x3047, 0x0000, 0x3049, 0x0000,
880x0000, 0x0000, 0x0000, 0x0000,
890x0000, 0x0000, 0x0000, 0x0000,
900x0000, 0x0000, 0x0000, 0x0000,
910x0000, 0x0000, 0x0000, 0x0000,
920x0000, 0x0000, 0x0000, 0x0000,
930x0000, 0x0000, 0x0000, 0x0000,
940x3063, 0x0000, 0x0000, 0x0000,
950x0000, 0x0000, 0x0000, 0x0000,
960x0000, 0x0000, 0x0000, 0x0000,
970x0000, 0x0000, 0x0000, 0x0000,
980x0000, 0x0000, 0x0000, 0x0000,
990x0000, 0x0000, 0x0000, 0x0000,
1000x0000, 0x0000, 0x0000, 0x0000,
1010x0000, 0x0000, 0x0000, 0x0000,
1020x3083, 0x0000, 0x3085, 0x0000,
1030x3087, 0x0000, 0x0000, 0x0000,
1040x0000, 0x0000, 0x0000, 0x308e,
1050x0000, 0x0000, 0x0000, 0x0000,
1060x0000, 0x0000, 0x0000, 0x0000,
1070x0000, 0x0000, 0x0000, 0x0000,
1080x0000, 0x0000, 0x0000, 0x0000,
1090x30a1, 0x0000, 0x30a3, 0x0000,
1100x30a5, 0x0000, 0x30a7, 0x0000,
1110x30a9, 0x0000, 0x0000, 0x0000,
1120x0000, 0x0000, 0x0000, 0x0000,
1130x0000, 0x0000, 0x0000, 0x0000,
1140x0000, 0x0000, 0x0000, 0x0000,
1150x0000, 0x0000, 0x0000, 0x0000,
1160x0000, 0x0000, 0x0000, 0x0000,
1170x0000, 0x0000, 0x30c3, 0x0000,
1180x0000, 0x0000, 0x0000, 0x0000,
1190x0000, 0x0000, 0x0000, 0x0000,
1200x0000, 0x0000, 0x0000, 0x0000,
1210x0000, 0x0000, 0x0000, 0x0000,
1220x0000, 0x0000, 0x0000, 0x0000,
1230x0000, 0x0000, 0x0000, 0x0000,
1240x0000, 0x0000, 0x0000, 0x0000,
1250x0000, 0x0000, 0x30e3, 0x0000,
1260x30e5, 0x0000, 0x30e7, 0x0000,
1270x0000, 0x0000, 0x0000, 0x0000,
1280x0000, 0x30ee, 0x0000, 0x0000,
1290x0000, 0x0000, 0x0000, 0x0000,
132static const unsigned short wchar2sjis_mac4[] = {
1330x040e, 0x040c, 0x040d, 0x040f,
1340x040a, 0x0410, 0x0411, 0x040b,
137static const unsigned short wchar2sjis_mac7[] = {
1390x046b, 0x046c, 0x046d, 0x046e,
1400x0468, 0x0475, 0x0478, 0x047b,
1410x0477, 0x047c, 0x047a, 0x0470,
1420x0480, 0x0473, 0x0474, 0x0479,
1430x047d, 0x047e, 0x0476, 0x047f,
1440x046f, 0x0000, 0x0471, 0x0472,
147static const unsigned short wchar2sjis_mac8[] = {
1490x04c2, 0x04c5, 0x0000, 0x0000,
1500x0000, 0x04c1, 0x04c3, };
152static const unsigned short wchar2sjis_mac9[] = {
1530x04e4, 0x0000, 0x0000, 0x04ce,
1540x0000, 0x04cb, 0x0000, 0x0000,
1550x0000, 0x0000, 0x0000, 0x0000,
1560x0000, 0x04d7, 0x0000, 0x0000,
1570x0000, 0x0000, 0x0000, 0x0000,
1580x04c9, 0x04d1, 0x04ca, 0x0000,
1590x04d0, 0x0000, 0x0000, 0x0000,
1600x0000, 0x0000, 0x04e5, 0x0000,
1610x0000, 0x0000, 0x04c7, 0x04d9,
1620x0000, 0x0000, 0x04da, 0x04d2,
1630x0000, 0x0000, 0x04e6, 0x04dc,
1640x0000, 0x0000, 0x0000, 0x0000,
1650x0000, 0x04e7, 0x0000, 0x04cc,
1660x0000, 0x0000, 0x04cf, 0x0000,
1670x0000, 0x04d5, 0x0000, 0x04db,
1680x0000, 0x0000, 0x0000, 0x0000,
1690x0000, 0x0000, 0x04d8, 0x0000,
1700x0000, 0x0000, 0x0000, 0x04e8,
1710x0000, 0x04c6, 0x04d4, 0x0000,
1720x0000, 0x04c8, 0x04cd, 0x0000,
1730x0000, 0x04d3, 0x0000, 0x0000,
1740x0000, 0x0000, 0x0000, 0x04d6,
1750x0000, 0x0000, 0x0000, 0x0000,
1760x0000, 0x0000, 0x0000, 0x0000,
1770x0000, 0x0000, 0x0000, 0x0000,
1780x0000, 0x0000, 0x0000, 0x0000,
1790x0000, 0x0000, 0x0000, 0x0000,
1800x0000, 0x0000, 0x0000, 0x0000,
1810x0000, 0x0000, 0x0000, 0x0000,
1820x0000, 0x0000, 0x0000, 0x0000,
1830x0000, 0x0000, 0x0000, 0x050f,
1840x050e, 0x050d, 0x050c, 0x0521,
1850x0000, 0x0000, 0x0000, 0x0000,
1860x0000, 0x03c6, 0x03c7, 0x03c8,
1870x0000, 0x0000, 0x0000, 0x0000,
1880x0000, 0x0000, 0x03b6, 0x03b8,
1890x03c5, 0x0000, 0x0000, 0x0000,
1900x0000, 0x0000, 0x03ba, 0x03bb,
1910x03bd, 0x0000, 0x0000, 0x0000,
1920x03ac, 0x03ae, 0x03b4, 0x03ad,
1930x03af, 0x03b2, 0x03b5, 0x0000,
1940x03b0, 0x03b3, 0x0000, 0x0000,
1950x0000, 0x0000, 0x0000, 0x0000,
1960x0000, 0x0000, 0x0000, 0x0000,
1970x03c1, 0x03c0, 0x03bf, 0x03be,
1980x0000, 0x0000, 0x0000, 0x0000,
1990x0000, 0x0000, 0x0000, 0x0000,
2000x0000, 0x0000, 0x0000, 0x0000,
2010x0000, 0x0000, 0x0000, 0x0000,
2020x03b9, 0x0000, 0x0000, 0x0000,
2030x0000, 0x0000, 0x0000, 0x03c4,
2040x0000, 0x0407, 0x0000, 0x0000,
2050x0000, 0x0000, 0x0000, 0x0000,
208static const unsigned short wchar2sjis_mac10[] = {
2090x1efc, 0x1ef4, 0x0000, 0x1ee9,
2100x0000, 0x1f01, 0x1f02, 0x1f07,
2110x1f08, 0x1f03, 0x1f04, 0x1f11,
2120x1f12, 0x1f0b, 0x1f0c, 0x1f09,
2130x1f0a, 0x1f0d, 0x1f0e, 0x1f0f,
216static const unsigned short code_tbl[][3] = {
217 {0x02f0, 0x0303, 0x2460},
218 {0x030e, 0x0321, 0x2474},
219 {0x032c, 0x0334, 0x2776},
220 {0x0341, 0x0349, 0x2488},
221 {0x034e, 0x0359, 0x2160},
222 {0x0362, 0x036d, 0x2170},
223 {0x038a, 0x03a3, 0x249c},
226static const unsigned short code_ofst_tbl[][2] = {
237static const unsigned short *code_map[] = {
238 sjis_mac2wchar1, sjis_mac2wchar2, sjis_mac2wchar3, sjis_mac2wchar4,
239 sjis_mac2wchar5, sjis_mac2wchar6, sjis_mac2wchar7, sjis_mac2wchar8};
241static const unsigned short code_tbl_m[][6] = {
242 {0x0340, 0xf860, 0x0030, 0x002e, 0x0000, 0x0000},
243 {0x03c9, 0xf860, 0x0054, 0x0042, 0x0000, 0x0000},
244 {0x035c, 0xf860, 0x0058, 0x0056, 0x0000, 0x0000},
245 {0x0370, 0xf860, 0x0078, 0x0076, 0x0000, 0x0000},
246 {0x0439, 0xf860, 0x2193, 0x2191, 0x0000, 0x0000},
247 {0x0409, 0xf861, 0x0046, 0x0041, 0x0058, 0x0000},
248 {0x035b, 0xf861, 0x0058, 0x0049, 0x0056, 0x0000},
249 {0x036f, 0xf861, 0x0078, 0x0069, 0x0076, 0x0000},
250 {0x035a, 0xf862, 0x0058, 0x0049, 0x0049, 0x0049},
251 {0x036e, 0xf862, 0x0078, 0x0069, 0x0069, 0x0069},
252 {0x0522, 0xf862, 0x6709, 0x9650, 0x4f1a, 0x793e},
253 {0x0523, 0xf862, 0x8ca1, 0x56e3, 0x6cd5, 0x4eba},
256static int code_tbl_m_len =
sizeof(code_tbl_m)/(
sizeof(
unsigned short)*6);
258static const unsigned short s_form_tbl[] = {
259 0x2010,0x2016,0x2026,
260 0x3001,0x3002,0x301c,0x3041,0x3043,0x3045,0x3047,0x3049,
261 0x3063,0x3083,0x3085,0x3087,0x308e,0x30a1,0x30a3,0x30a5,
262 0x30a7,0x30a9,0x30c3,0x30e3,0x30e5,0x30e7,0x30ee,0x30f5,
263 0x30f6,0x30fc,0xff1d,0xff3b,0xff3d,0xff5c,0xffe3,
264 0x2026,0xff47,0xff4d,
265 0x5927,0x5c0f,0x63a7,
266 0x21e6,0x21e7,0x21e8,0x21e9,
269static int s_form_tbl_len =
sizeof(s_form_tbl)/
sizeof(
unsigned short);
271static const unsigned short s_form_sjis_tbl[] = {
272 0xeb5d,0xeb61,0xeb63,
273 0xeb41,0xeb42,0xeb60,0xec9f,0xeca1,0xeca3,0xeca5,0xeca7,
274 0xecc1,0xece1,0xece3,0xece5,0xecec,0xed40,0xed42,0xed44,
275 0xed46,0xed48,0xed62,0xed83,0xed85,0xed87,0xed8e,0xed95,
276 0xed96,0xeb5b,0xeb81,0xeb6d,0xeb6e,0xeb62,0xeb50,
277 0x00ff,0x864b,0x8645,
278 0x8791,0x8792,0x879d,
279 0x86d4,0x86d5,0x86d3,0x86d6,
282static const unsigned short s_form_sjis_fallback_tbl[] = {
283 0x815d,0x8161,0x8163,
284 0x8141,0x8142,0x8160,0x829f,0x82a1,0x82a3,0x82a5,0x82a7,
285 0x82c1,0x82e1,0x82e3,0x82e5,0x82ec,0x8340,0x8342,0x8344,
286 0x8346,0x8348,0x8362,0x8383,0x8385,0x8387,0x838e,0x8395,
287 0x8396,0x815b,0x8181,0x816d,0x816e,0x8162,0x8150,
288 0x815d,0x8287,0x828d,
289 0x91e5,0x8fac,0x8d54,
290 0x86d0,0x86d1,0x86cf,0x86d2,
293static const unsigned short wchar2sjis_mac_r_tbl[][3] = {
294 {0x2160, 0x216b, 0x034e},
295 {0x2170, 0x217b, 0x0362},
296 {0x2460, 0x2473, 0x02f0},
297 {0x2474, 0x2487, 0x030e},
298 {0x2488, 0x2490, 0x0341},
299 {0x249c, 0x24b5, 0x038a},
300 {0x2776, 0x277e, 0x032c},
301 {0x30f7, 0x30fa, 0x054e},
302 {0x32a4, 0x32a9, 0x04ba},
305static int wchar2sjis_mac_r_tbl_len =
sizeof(wchar2sjis_mac_r_tbl)/(3*
sizeof(
unsigned short));
307static const unsigned short wchar2sjis_mac_r_map[][2] = {
315static int wchar2sjis_mac_r_map_len =
sizeof(wchar2sjis_mac_r_map)/(2*
sizeof(
unsigned short));
317static const unsigned short *wchar2sjis_mac_code_map[] = {
318 wchar2sjis_mac4, wchar2sjis_mac7, wchar2sjis_mac8, wchar2sjis_mac9, wchar2sjis_mac10};
320static const unsigned short wchar2sjis_mac_wchar_tbl[][2] = {
347static int wchar2sjis_mac_wchar_tbl_len =
sizeof(wchar2sjis_mac_wchar_tbl)/(2*
sizeof(
unsigned short));