From 942dd584d310d58e4c6b95ce93a6d4e2a6f37328 Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Wed, 24 Aug 2011 15:29:17 +0000 Subject: [PATCH] MFH: added iso2022jp-mobile and emoji unsuppoted in unicode 6.0. --- ext/mbstring/config.m4 | 1 + ext/mbstring/config.w32 | 5 +- ext/mbstring/libmbfl/filters/Makefile.am | 2 + ext/mbstring/libmbfl/filters/emoji2uni.h | 1462 +++++++++-------- .../libmbfl/filters/mbfilter_iso2022_jp_ms.c | 4 +- .../filters/mbfilter_iso2022jp_mobile.c | 431 +++++ .../filters/mbfilter_iso2022jp_mobile.h | 43 + .../libmbfl/filters/mbfilter_sjis_mobile.c | 152 +- .../libmbfl/filters/mbfilter_sjis_mobile.h | 4 +- ext/mbstring/libmbfl/mbfl/mbfl_convert.c | 3 + ext/mbstring/libmbfl/mbfl/mbfl_encoding.c | 2 + ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 1 + ext/mbstring/libmbfl/mbfl/mbfl_ident.c | 2 + 13 files changed, 1365 insertions(+), 747 deletions(-) create mode 100644 ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c create mode 100644 ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.h diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index d27e68bfaff..5d70d45b804 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -246,6 +246,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_hz.c libmbfl/filters/mbfilter_iso2022_jp_ms.c libmbfl/filters/mbfilter_iso2022jp_2004.c + libmbfl/filters/mbfilter_iso2022jp_mobile.c libmbfl/filters/mbfilter_iso2022_kr.c libmbfl/filters/mbfilter_iso8859_1.c libmbfl/filters/mbfilter_iso8859_10.c diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32 index ddeb00d61b0..7bc9518cb8c 100644 --- a/ext/mbstring/config.w32 +++ b/ext/mbstring/config.w32 @@ -35,8 +35,9 @@ if (PHP_MBSTRING != "no") { mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_utf8.c mbfilter_utf8_mobile.c \ mbfilter_koi8u.c mbfilter_cp1254.c mbfilter_euc_jp_2004.c \ mbfilter_uuencode.c mbfilter_armscii8.c mbfilter_cp850.c \ - mbfilter_cp5022x.c mbfilter_sjis_open.c mbfilter_sjis_mobile.c mbfilter_sjis_mac.c \ - mbfilter_iso2022jp_2004.c \ + mbfilter_cp5022x.c mbfilter_sjis_open.c mbfilter_sjis_mobile.c \ + mbfilter_sjis_mac.c \ + mbfilter_iso2022jp_2004.c mbfilter_iso2022jp_mobile.c \ mbfilter_tl_jisx0201_jisx0208.c", "mbstring"); ADD_SOURCES("ext/mbstring/libmbfl/mbfl", "mbfilter.c mbfilter_8bit.c \ diff --git a/ext/mbstring/libmbfl/filters/Makefile.am b/ext/mbstring/libmbfl/filters/Makefile.am index 4420b36621d..33f9049ae94 100644 --- a/ext/mbstring/libmbfl/filters/Makefile.am +++ b/ext/mbstring/libmbfl/filters/Makefile.am @@ -56,6 +56,7 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_uhc.c \ mbfilter_iso2022_jp_ms.c \ mbfilter_iso2022jp_2004.c \ + mbfilter_iso2022jp_mobile.c \ mbfilter_gb18030.c \ mbfilter_iso2022_kr.c \ mbfilter_cp866.c \ @@ -91,6 +92,7 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_hz.h \ mbfilter_iso2022_jp_ms.h \ mbfilter_iso2022jp_2004.h \ + mbfilter_iso2022jp_mobile.h \ mbfilter_iso2022_kr.h \ mbfilter_iso8859_1.h \ mbfilter_iso8859_10.h \ diff --git a/ext/mbstring/libmbfl/filters/emoji2uni.h b/ext/mbstring/libmbfl/filters/emoji2uni.h index 99c7cc2d9d8..756b409372d 100644 --- a/ext/mbstring/libmbfl/filters/emoji2uni.h +++ b/ext/mbstring/libmbfl/filters/emoji2uni.h @@ -1,424 +1,417 @@ -const int mb_tbl_code2uni_docomo1_min = 0x28c2; -const int mb_tbl_code2uni_docomo1_max = 0x29db; +static const int mb_tbl_code2uni_docomo1_min = 0x28c2; +static const int mb_tbl_code2uni_docomo1_max = 0x29db; -const int mb_tbl_code2uni_docomo1[] = { // 0x28c2 - 0x29db - 0x02600, 0x02601, 0x02614, 0x026c4, - 0x026a1, 0x1f300, 0x1f301, 0x1f302, - 0x02648, 0x02649, 0x0264a, 0x0264b, - 0x0264c, 0x0264d, 0x0264e, 0x0264f, - 0x02650, 0x02651, 0x02652, 0x02653, - 0x1f3bd, 0x026be, 0x026f3, 0x1f3be, - 0x026bd, 0x1f3bf, 0x1f3c0, 0x1f3c1, - 0x1f4df, 0x1f683, 0x024c2, 0x1f684, - 0x1f697, 0x1f699, 0x1f68c, 0x1f6a2, - 0x02708, 0x1f3e0, 0x1f3e2, 0x1f3e3, - 0x1f3e5, 0x1f3e6, 0x1f3e7, 0x1f3e8, - 0x1f3ea, 0x026fd, 0x1f17f, 0x1f6a5, - 0x1f6bb, 0x1f374, 0x02615, 0x1f378, - 0x1f37a, 0x1f354, 0x1f460, 0x02702, - 0x1f3a4, 0x1f3a5, 0x02197, 0x1f3a0, - 0x1f3a7, 0x1f3a8, 0x1f3a9, 0x1f3aa, - 0x1f3ab, 0x1f6ac, 0x1f6ad, 0x1f4f7, - 0x1f45c, 0x1f4d6, 0x1f380, 0x1f381, - 0x1f382, 0x0260e, 0x1f4f1, 0x1f4dd, - 0x1f4fa, 0x1f3ae, 0x1f4bf, 0x02665, - 0x02660, 0x02666, 0x02663, 0x1f440, - 0x1f442, 0x0270a, 0x0270c, 0x0270b, - 0x02198, 0x02196, 0x1f463, 0x1f45f, - 0x1f453, 0x0267f, 0x1f311, 0x1f314, - 0x1f313, 0x1f319, 0x1f315, 0x1f436, - 0x1f431, 0x026f5, 0x1f384, 0x02199, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x1f3ac, 0x1f45d, - 0x02712, 0x00000, 0x00000, 0x1f464, - 0x1f4ba, 0x1f303, 0x00000, 0x00000, - 0x00000, 0x1f51c, 0x1f51b, 0x1f51a, - 0x023f0, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x1f4f2, 0x1f4e9, 0x1f4e0, 0x00000, - 0x00000, 0x02709, 0x00000, 0x00000, - 0x1f4b4, 0x1f193, 0x1f194, 0x1f511, - 0x021a9, 0x1f191, 0x1f50d, 0x1f195, - 0x1f6a9, 0x00000, 0x00023, 0x00000, - 0x00031, 0x00032, 0x00033, 0x00034, - 0x00035, 0x00036, 0x00037, 0x00038, - 0x00039, 0x00030, 0x02764, 0x1f493, - 0x1f494, 0x1f495, 0x1f603, 0x1f620, - 0x1f61e, 0x1f616, 0x1f635, 0x02934, - 0x1f3b5, 0x02668, 0x1f4a0, 0x1f48b, - 0x02728, 0x1f4a1, 0x1f4a2, 0x1f44a, - 0x1f4a3, 0x1f3b6, 0x02935, 0x1f4a4, - 0x02757, 0x02049, 0x0203c, 0x1f4a5, - 0x1f4a6, 0x1f4a7, 0x1f4a8, 0x03030, - 0x027b0, 0x1f197, 0x00000, 0x00000, - 0x1f455, 0x1f45b, 0x1f484, 0x1f456, - 0x1f3c2, 0x1f514, 0x1f6aa, 0x1f4b0, - 0x1f4bb, 0x1f48c, 0x1f527, 0x0270f, - 0x1f451, 0x1f48d, 0x023f3, 0x1f6b2, - 0x1f375, 0x0231a, 0x1f614, 0x1f60c, - 0x1f605, 0x1f613, 0x1f621, 0x1f612, - 0x1f60d, 0x1f44d, 0x1f61c, 0x1f609, - 0x1f606, 0x1f623, 0x1f60f, 0x1f62d, - 0x1f622, 0x1f196, 0x1f4ce, 0x000a9, - 0x02122, 0x1f3c3, 0x03299, 0x0267b, - 0x000ae, 0x026a0, 0x1f232, 0x1f233, - 0x1f234, 0x1f235, 0x02194, 0x02195, - 0x1f3eb, 0x1f30a, 0x1f5fb, 0x1f340, - 0x1f352, 0x1f337, 0x1f34c, 0x1f34e, - 0x1f331, 0x1f341, 0x1f338, 0x1f359, - 0x1f370, 0x1f376, 0x1f35c, 0x1f35e, - 0x1f40c, 0x1f424, 0x1f427, 0x1f41f, - 0x1f60b, 0x1f601, 0x1f434, 0x1f437, - 0x1f377, 0x1f631, }; +static const unsigned short mb_tbl_code2uni_docomo1[] = { // 0x28c2 - 0x29db + 0x2600, 0x2601, 0x2614, 0x26c4, + 0x26a1, 0xf300, 0xf301, 0xf302, + 0x2648, 0x2649, 0x264a, 0x264b, + 0x264c, 0x264d, 0x264e, 0x264f, + 0x2650, 0x2651, 0x2652, 0x2653, + 0xf3bd, 0x26be, 0x26f3, 0xf3be, + 0x26bd, 0xf3bf, 0xf3c0, 0xf3c1, + 0xf4df, 0xf683, 0x24c2, 0xf684, + 0xf697, 0xf699, 0xf68c, 0xf6a2, + 0x2708, 0xf3e0, 0xf3e2, 0xf3e3, + 0xf3e5, 0xf3e6, 0xf3e7, 0xf3e8, + 0xf3ea, 0x26fd, 0xf17f, 0xf6a5, + 0xf6bb, 0xf374, 0x2615, 0xf378, + 0xf37a, 0xf354, 0xf460, 0x2702, + 0xf3a4, 0xf3a5, 0x2197, 0xf3a0, + 0xf3a7, 0xf3a8, 0xf3a9, 0xf3aa, + 0xf3ab, 0xf6ac, 0xf6ad, 0xf4f7, + 0xf45c, 0xf4d6, 0xf380, 0xf381, + 0xf382, 0x260e, 0xf4f1, 0xf4dd, + 0xf4fa, 0xf3ae, 0xf4bf, 0x2665, + 0x2660, 0x2666, 0x2663, 0xf440, + 0xf442, 0x270a, 0x270c, 0x270b, + 0x2198, 0x2196, 0xf463, 0xf45f, + 0xf453, 0x267f, 0xf311, 0xf314, + 0xf313, 0xf319, 0xf315, 0xf436, + 0xf431, 0x26f5, 0xf384, 0x2199, + 0xEE16, 0xEE17, 0xEE18, 0xEE19, + 0xEE1A, 0xEE1B, 0xf3ac, 0xf45d, + 0x2712, 0xEE1C, 0xEE1D, 0xf464, + 0xf4ba, 0xf303, 0xEE1E, 0xEE1F, + 0xEE20, 0xf51c, 0xf51b, 0xf51a, + 0x23f0, 0xEE21, 0xEE22, 0xEE23, + 0xEE24, 0xEE25, 0xEE26, 0xEE27, + 0xEE28, 0xEE29, 0xEE2A, 0xEE2B, + 0xEE2C, 0xEE2D, 0xEE2E, 0xEE2F, + 0xEE30, 0xEE31, 0xEE32, 0xEE33, + 0xf4f2, 0xf4e9, 0xf4e0, 0xEE10, + 0xEE11, 0x2709, 0xEE12, 0xEE13, + 0xf4b4, 0xf193, 0xf194, 0xf511, + 0x21a9, 0xf191, 0xf50d, 0xf195, + 0xf6a9, 0x0000, 0x0023, 0xE82D, + 0x0031, 0x0032, 0x0033, 0x0034, + 0x0035, 0x0036, 0x0037, 0x0038, + 0x0039, 0x0030, 0x2764, 0xf493, + 0xf494, 0xf495, 0xf603, 0xf620, + 0xf61e, 0xf616, 0xf635, 0x2934, + 0xf3b5, 0x2668, 0xf4a0, 0xf48b, + 0x2728, 0xf4a1, 0xf4a2, 0xf44a, + 0xf4a3, 0xf3b6, 0x2935, 0xf4a4, + 0x2757, 0x2049, 0x203c, 0xf4a5, + 0xf4a6, 0xf4a7, 0xf4a8, 0x3030, + 0x27b0, 0xf197, 0xEE14, 0xEE15, + 0xf455, 0xf45b, 0xf484, 0xf456, + 0xf3c2, 0xf514, 0xf6aa, 0xf4b0, + 0xf4bb, 0xf48c, 0xf527, 0x270f, + 0xf451, 0xf48d, 0x23f3, 0xf6b2, + 0xf375, 0x231a, 0xf614, 0xf60c, + 0xf605, 0xf613, 0xf621, 0xf612, + 0xf60d, 0xf44d, 0xf61c, 0xf609, + 0xf606, 0xf623, 0xf60f, 0xf62d, + 0xf622, 0xf196, 0xf4ce, 0x00a9, + 0x2122, 0xf3c3, 0x3299, 0x267b, + 0x00ae, 0x26a0, 0xf232, 0xf233, + 0xf234, 0xf235, 0x2194, 0x2195, + 0xf3eb, 0xf30a, 0xf5fb, 0xf340, + 0xf352, 0xf337, 0xf34c, 0xf34e, + 0xf331, 0xf341, 0xf338, 0xf359, + 0xf370, 0xf376, 0xf35c, 0xf35e, + 0xf40c, 0xf424, 0xf427, 0xf41f, + 0xf60b, 0xf601, 0xf434, 0xf437, + 0xf377, 0xf631, }; +static const int mb_tbl_code2uni_kddi1_min = 0x24b8; +static const int mb_tbl_code2uni_kddi1_max = 0x25c6; -const int mb_tbl_code2uni_kddi1_min = 0x24b8; -const int mb_tbl_code2uni_kddi1_max = 0x25c0; +static const unsigned short mb_tbl_code2uni_kddi1[] = { // 0x24b8 - 0x25c6 + 0xf342, 0xf4bc, 0x26f2, 0x26fa, + 0xf004, 0xf19a, 0xf3c6, 0xf422, + 0xf1ea, 0xf1f7, 0xf6a7, 0xf6c0, + 0xf38c, 0xf306, 0xf423, 0xf4b9, + 0xf46e, 0xf3e3, 0xf3e5, 0xf3eb, + 0xf3e8, 0xf6a2, 0xf51e, 0xf4f6, + 0xf192, 0xf239, 0xf202, 0xf194, + 0xf235, 0xf233, 0xf22f, 0xf23a, + 0xf446, 0xf447, 0xf52e, 0xf4f3, + 0xf4f4, 0xf4dd, 0xf454, 0xf33a, + 0xf490, 0xf335, 0xf376, 0xf37b, + 0x3297, 0xf48a, 0xf388, 0xf389, + 0xEE42, 0xf452, 0xf462, 0xf485, + 0xf487, 0xf488, 0xf458, 0xf459, + 0x2665, 0xf496, 0xf499, 0xf49a, + 0xf49b, 0xf49c, 0x2728, 0xf3bf, + 0x2b55, 0xf375, 0xf35e, 0xf366, + 0xf35f, 0xf361, 0xf358, 0xf35a, + 0xf35d, 0xf35b, 0xf362, 0xf363, + 0xf34e, 0xf34a, 0xf345, 0xf346, + 0xf371, 0xf372, 0xf60f, 0xf614, + 0xf624, 0xf623, 0xf616, 0xf62a, + 0xf60c, 0xf628, 0xf637, 0xf633, + 0xf612, 0xf632, 0xf630, 0xf3bc, + 0xf60a, 0xf61a, 0xf618, 0xf443, + 0xf444, 0xf64f, 0xf44f, 0xf44c, + 0xf44e, 0xf44b, 0xf645, 0xf646, + 0xf647, 0xf491, 0xf46f, 0xf3ba, + 0xf3b1, 0xf3ca, 0xf692, 0xf691, + 0xf693, 0xf3a2, 0xf38d, 0xf38e, + 0xf393, 0xf392, 0xf38f, 0xf302, + 0xf470, 0xf367, 0xf387, 0xf41a, + 0xf390, 0xf383, 0xf391, 0xf385, + 0xf303, 0xf308, 0xf3e9, 0xf305, + 0xf3a9, 0xf3ec, 0xf3ef, 0xf3f0, + 0xf3ed, 0xf1eb, 0xf1e9, 0xf1ee, + 0xf1ec, 0xf1e8, 0xf1f0, 0xf471, + 0xf472, 0xf473, 0xf474, 0xf475, + 0xf476, 0xf477, 0xf478, 0xf42c, + 0xf483, 0xf420, 0xf41b, 0xf418, + 0xf428, 0xf42e, 0xf40d, 0xf414, + 0xf417, 0xf42b, 0xf170, 0xf171, + 0xf17e, 0xf18e, 0xf463, 0xf45f, + 0xf6a9, 0x2934, 0x2935, 0x2049, + 0x203c, 0x27b0, 0xf348, 0xf34d, + 0xf347, 0xf34c, 0xf33d, 0xf344, + 0xf330, 0xf351, 0xf360, 0xf355, + 0xf357, 0xf38b, 0xf379, 0xf432, + 0xf3b9, 0xf3c4, 0xf3a3, 0xf3b3, + 0xf479, 0xf47a, 0xf43c, 0xf445, + 0xf43d, 0xf33c, 0xf368, 0xf369, + 0xf36a, 0xf36b, 0xf36c, 0xf36d, + 0xf648, 0xf64a, 0xf649, 0xf30b, + 0xf49d, 0xf524, 0xf36e, 0xf41d, + 0xf41e, 0xf36f, 0xf34f, 0xf4b8, + 0xf4ab, 0xf621, 0xf63e, 0xf30c, + 0xf63d, 0xf63a, 0xf4e9, 0xf639, + 0xf602, 0xf63b, 0xf640, 0xf629, + 0xf63f, 0xf622, 0xf63c, 0xf457, + 0xf5ff, 0xf689, 0xf3b4, 0xf0cf, + 0xf364, 0xf4e7, 0xf6b6, 0xf6a8, + 0xEE43, 0xf493, 0xf425, 0xf456, + 0xf48c, 0x267b, 0x2194, 0x2195, + 0xf30a, 0xf331, 0xf40c, 0xf638, + 0xf601, 0xEE44, 0xf33f, 0x270a, + 0x0023, 0xf64b, 0xf64c, 0xf64d, + 0xf64e, 0xEE45, 0xEE46, 0xEE47, + 0xEE48, 0xEE49, 0xEE4A}; +static const int mb_tbl_code2uni_kddi2_min = 0x26ec; +static const int mb_tbl_code2uni_kddi2_max = 0x2863; -const int mb_tbl_code2uni_kddi1[] = { // 0x24b8 - 0x25c0 - 0x1f342, 0x1f4bc, 0x026f2, 0x026fa, - 0x1f004, 0x1f19a, 0x1f3c6, 0x1f422, - 0x1f1ea, 0x1f1f7, 0x1f6a7, 0x1f6c0, - 0x1f38c, 0x1f306, 0x1f423, 0x1f4b9, - 0x1f46e, 0x1f3e3, 0x1f3e5, 0x1f3eb, - 0x1f3e8, 0x1f6a2, 0x1f51e, 0x1f4f6, - 0x1f192, 0x1f239, 0x1f202, 0x1f194, - 0x1f235, 0x1f233, 0x1f22f, 0x1f23a, - 0x1f446, 0x1f447, 0x1f52e, 0x1f4f3, - 0x1f4f4, 0x1f4dd, 0x1f454, 0x1f33a, - 0x1f490, 0x1f335, 0x1f376, 0x1f37b, - 0x03297, 0x1f48a, 0x1f388, 0x1f389, - 0x00000, 0x1f452, 0x1f462, 0x1f485, - 0x1f487, 0x1f488, 0x1f458, 0x1f459, - 0x02665, 0x1f496, 0x1f499, 0x1f49a, - 0x1f49b, 0x1f49c, 0x02728, 0x1f3bf, - 0x02b55, 0x1f375, 0x1f35e, 0x1f366, - 0x1f35f, 0x1f361, 0x1f358, 0x1f35a, - 0x1f35d, 0x1f35b, 0x1f362, 0x1f363, - 0x1f34e, 0x1f34a, 0x1f345, 0x1f346, - 0x1f371, 0x1f372, 0x1f60f, 0x1f614, - 0x1f624, 0x1f623, 0x1f616, 0x1f62a, - 0x1f60c, 0x1f628, 0x1f637, 0x1f633, - 0x1f612, 0x1f632, 0x1f630, 0x1f3bc, - 0x1f60a, 0x1f61a, 0x1f618, 0x1f443, - 0x1f444, 0x1f64f, 0x1f44f, 0x1f44c, - 0x1f44e, 0x1f44b, 0x1f645, 0x1f646, - 0x1f647, 0x1f491, 0x1f46f, 0x1f3ba, - 0x1f3b1, 0x1f3ca, 0x1f692, 0x1f691, - 0x1f693, 0x1f3a2, 0x1f38d, 0x1f38e, - 0x1f393, 0x1f392, 0x1f38f, 0x1f302, - 0x1f470, 0x1f367, 0x1f387, 0x1f41a, - 0x1f390, 0x1f383, 0x1f391, 0x1f385, - 0x1f303, 0x1f308, 0x1f3e9, 0x1f305, - 0x1f3a9, 0x1f3ec, 0x1f3ef, 0x1f3f0, - 0x1f3ed, 0x1f1eb, 0x1f1e9, 0x1f1ee, - 0x1f1ec, 0x1f1e8, 0x1f1f0, 0x1f471, - 0x1f472, 0x1f473, 0x1f474, 0x1f475, - 0x1f476, 0x1f477, 0x1f478, 0x1f42c, - 0x1f483, 0x1f420, 0x1f41b, 0x1f418, - 0x1f428, 0x1f42e, 0x1f40d, 0x1f414, - 0x1f417, 0x1f42b, 0x1f170, 0x1f171, - 0x1f17e, 0x1f18e, 0x1f463, 0x1f45f, - 0x1f6a9, 0x02934, 0x02935, 0x02049, - 0x0203c, 0x027b0, 0x1f348, 0x1f34d, - 0x1f347, 0x1f34c, 0x1f33d, 0x1f344, - 0x1f330, 0x1f351, 0x1f360, 0x1f355, - 0x1f357, 0x1f38b, 0x1f379, 0x1f432, - 0x1f3b9, 0x1f3c4, 0x1f3a3, 0x1f3b3, - 0x1f479, 0x1f47a, 0x1f43c, 0x1f445, - 0x1f43d, 0x1f33c, 0x1f368, 0x1f369, - 0x1f36a, 0x1f36b, 0x1f36c, 0x1f36d, - 0x1f648, 0x1f64a, 0x1f649, 0x1f30b, - 0x1f49d, 0x1f524, 0x1f36e, 0x1f41d, - 0x1f41e, 0x1f36f, 0x1f34f, 0x1f4b8, - 0x1f4ab, 0x1f621, 0x1f63e, 0x1f30c, - 0x1f63d, 0x1f63a, 0x1f4e9, 0x1f639, - 0x1f602, 0x1f63b, 0x1f640, 0x1f629, - 0x1f63f, 0x1f622, 0x1f63c, 0x1f457, - 0x1f5ff, 0x1f689, 0x1f3b4, 0x1f0cf, - 0x1f364, 0x1f4e7, 0x1f6b6, 0x1f6a8, - 0x00000, 0x1f493, 0x1f425, 0x1f456, - 0x1f48c, 0x0267b, 0x02194, 0x02195, - 0x1f30a, 0x1f331, 0x1f40c, 0x1f638, - 0x1f601, 0x00000, 0x1f33f, 0x0270a, - 0x00023, 0x1f64b, 0x1f64c, 0x1f64d, - 0x1f64e, }; -const int mb_tbl_code2uni_kddi2_min = 0x26ec; -const int mb_tbl_code2uni_kddi2_max = 0x2863; - -const int mb_tbl_code2uni_kddi2[] = { // 0x26ec - 0x2863 - 0x1f320, 0x1f300, 0x1f6a5, 0x1f3c3, - 0x02747, 0x1f3a1, 0x1f3b0, 0x1f38a, - 0x1f433, 0x1f603, 0x1f620, 0x1f62d, - 0x1f62b, 0x1f4a4, 0x1f4a1, 0x1f494, - 0x1f495, 0x02734, 0x1f4a3, 0x1f525, - 0x023f3, 0x1f6ac, 0x1f6ad, 0x0267f, - 0x1f530, 0x026a0, 0x02757, 0x02753, - 0x026d4, 0x026c4, 0x1f319, 0x026a1, - 0x02600, 0x1f31b, 0x02744, 0x02b50, - 0x02614, 0x02601, 0x026c5, 0x02648, - 0x02649, 0x0264a, 0x0264b, 0x0264c, - 0x0264d, 0x0264e, 0x0264f, 0x02650, - 0x02651, 0x02652, 0x02653, 0x026ce, - 0x1f45c, 0x1f4d4, 0x1f3ab, 0x1f4d6, - 0x1f4ce, 0x0270f, 0x1f4d0, 0x1f3e7, - 0x1f3ea, 0x1f6bb, 0x1f17f, 0x1f68f, - 0x1f4e1, 0x02693, 0x1f3e6, 0x1f3e0, - 0x1f374, 0x1f3e2, 0x1f6b2, 0x1f68c, - 0x1f685, 0x1f697, 0x1f69a, 0x02708, - 0x026f5, 0x1f683, 0x026bd, 0x1f3be, - 0x1f3c2, 0x1f3c1, 0x026be, 0x1f3c8, - 0x02668, 0x1f3ee, 0x1f3ac, 0x1f309, - 0x1f5fc, 0x1f377, 0x1f378, 0x1f37a, - 0x1f356, 0x1f3af, 0x1f3ae, 0x1f4b0, - 0x1f3b2, 0x1f384, 0x1f338, 0x1f47b, - 0x1f1ef, 0x1f349, 0x1f341, 0x1f381, - 0x1f370, 0x1f373, 0x1f352, 0x1f421, - 0x1f353, 0x1f359, 0x1f354, 0x1f430, - 0x1f434, 0x1f435, 0x1f438, 0x1f431, - 0x1f427, 0x1f41c, 0x1f437, 0x1f429, - 0x1f424, 0x1f436, 0x1f334, 0x1f33b, - 0x1f337, 0x1f4a2, 0x1f4a7, 0x1f61c, - 0x1f198, 0x1f4aa, 0x1f498, 0x1f48b, - 0x1f47e, 0x1f365, 0x1f43e, 0x1f47f, - 0x1f4ae, 0x03299, 0x1f4af, 0x1f44a, - 0x1f4a8, 0x1f4a9, 0x0261d, 0x1f250, - 0x1f480, 0x1f44d, 0x1f469, 0x0263a, - 0x1f468, 0x1f4ac, 0x1f453, 0x1f448, - 0x1f449, 0x1f46a, 0x1f4fa, 0x1f3a4, - 0x1f45b, 0x1f3b6, 0x1f3b8, 0x1f3bb, - 0x1f3a7, 0x1f484, 0x1f52b, 0x1f486, - 0x1f4bf, 0x1f45a, 0x1f47d, 0x1f199, - 0x1f489, 0x1f50a, 0x1f514, 0x1f340, - 0x1f48d, 0x1f4f7, 0x02702, 0x1f3a5, - 0x1f50d, 0x1f511, 0x1f460, 0x1f4ea, - 0x1f512, 0x1f4db, 0x1f4de, 0x1f4e6, - 0x1f4e0, 0x02709, 0x00031, 0x00032, - 0x00033, 0x00034, 0x00035, 0x00036, - 0x00037, 0x00038, 0x00039, 0x1f51f, - 0x00000, 0x025c0, 0x025b6, 0x023ea, - 0x023e9, 0x025ab, 0x025aa, 0x02139, - 0x025fd, 0x025fe, 0x1f538, 0x1f539, - 0x025fb, 0x025fc, 0x026aa, 0x026ab, - 0x02795, 0x02796, 0x02733, 0x02b06, - 0x02b07, 0x1f6ab, 0x1f53d, 0x1f53c, - 0x023ec, 0x023eb, 0x1f536, 0x1f537, - 0x02b1c, 0x02b1b, 0x1f534, 0x1f535, - 0x02196, 0x02198, 0x02122, 0x02716, - 0x0274c, 0x0274e, 0x027a1, 0x02b05, - 0x02797, 0x02197, 0x02199, 0x02714, - 0x000a9, 0x000ae, 0x1f53a, 0x1f53b, - 0x021aa, 0x021a9, 0x02705, 0x1f4dc, - 0x1f4cd, 0x1f4c3, 0x1f4be, 0x1f4c5, - 0x1f4cb, 0x1f4d7, 0x1f4d8, 0x1f4d9, - 0x1f4d5, 0x1f4c4, 0x1f4c6, 0x1f4d3, - 0x1f4c7, 0x1f4cc, 0x1f4d2, 0x1f4da, - 0x1f4cf, 0x026fd, 0x1f5fe, 0x1f1fa, - 0x1f4ca, 0x1f4c8, 0x1f4c9, 0x00000, - 0x1f193, 0x1f4b2, 0x0231a, 0x0231b, - 0x1f4b3, 0x1f4b4, 0x1f4f9, 0x1f52a, - 0x1f4fc, 0x1f529, 0x1f4bd, 0x1f526, - 0x1f50b, 0x1f4b5, 0x00000, 0x1f527, - 0x1f4f1, 0x1f50c, 0x1f517, 0x1f4f0, - 0x02003, 0x02002, 0x02005, 0x1f4c1, - 0x1f4c2, 0x1f4e8, 0x1f4e4, 0x1f4e5, - 0x023f0, 0x02764, 0x0260e, 0x02615, - 0x1f301, 0x026f3, 0x1f3c0, 0x1f4df, - 0x1f3a8, 0x1f3ad, 0x1f3aa, 0x1f380, - 0x1f382, 0x02660, 0x02666, 0x02663, - 0x1f440, 0x1f442, 0x0270c, 0x0270b, - 0x1f311, 0x1f314, 0x1f313, 0x1f191, - 0x00030, 0x1f197, 0x1f635, 0x1f49e, - 0x1f4a5, 0x1f4a6, 0x00000, 0x1f30f, - 0x1f35c, 0x00000, 0x1f510, 0x1f520, - 0x1f521, 0x1f522, 0x1f523, 0x1f251, - 0x02611, 0x02712, 0x1f518, 0x1f50e, - 0x1f519, 0x1f516, 0x1f4f2, 0x1f3e1, - 0x1f4eb, 0x1f4d1, 0x1f50f, 0x1f503, - 0x1f195, 0x1f455, 0x1f45e, 0x1f4bb, - 0x1f4fb, 0x1f339, 0x026ea, 0x1f687, - 0x1f5fb, 0x1f3b5, 0x1f47c, 0x1f42f, - 0x1f43b, 0x1f42d, 0x1f609, 0x1f60d, - 0x1f631, 0x1f613, 0x1f419, 0x1f680, - 0x1f451, 0x1f48f, 0x1f528, 0x1f386, +static const unsigned short mb_tbl_code2uni_kddi2[] = { // 0x26ec - 0x2863 + 0xf320, 0xf300, 0xf6a5, 0xf3c3, + 0x2747, 0xf3a1, 0xf3b0, 0xf38a, + 0xf433, 0xf603, 0xf620, 0xf62d, + 0xf62b, 0xf4a4, 0xf4a1, 0xf494, + 0xf495, 0x2734, 0xf4a3, 0xf525, + 0x23f3, 0xf6ac, 0xf6ad, 0x267f, + 0xf530, 0x26a0, 0x2757, 0x2753, + 0x26d4, 0x26c4, 0xf319, 0x26a1, + 0x2600, 0xf31b, 0x2744, 0x2b50, + 0x2614, 0x2601, 0x26c5, 0x2648, + 0x2649, 0x264a, 0x264b, 0x264c, + 0x264d, 0x264e, 0x264f, 0x2650, + 0x2651, 0x2652, 0x2653, 0x26ce, + 0xf45c, 0xf4d4, 0xf3ab, 0xf4d6, + 0xf4ce, 0x270f, 0xf4d0, 0xf3e7, + 0xf3ea, 0xf6bb, 0xf17f, 0xf68f, + 0xf4e1, 0x2693, 0xf3e6, 0xf3e0, + 0xf374, 0xf3e2, 0xf6b2, 0xf68c, + 0xf685, 0xf697, 0xf69a, 0x2708, + 0x26f5, 0xf683, 0x26bd, 0xf3be, + 0xf3c2, 0xf3c1, 0x26be, 0xf3c8, + 0x2668, 0xf3ee, 0xf3ac, 0xf309, + 0xf5fc, 0xf377, 0xf378, 0xf37a, + 0xf356, 0xf3af, 0xf3ae, 0xf4b0, + 0xf3b2, 0xf384, 0xf338, 0xf47b, + 0xf1ef, 0xf349, 0xf341, 0xf381, + 0xf370, 0xf373, 0xf352, 0xf421, + 0xf353, 0xf359, 0xf354, 0xf430, + 0xf434, 0xf435, 0xf438, 0xf431, + 0xf427, 0xf41c, 0xf437, 0xf429, + 0xf424, 0xf436, 0xf334, 0xf33b, + 0xf337, 0xf4a2, 0xf4a7, 0xf61c, + 0xf198, 0xf4aa, 0xf498, 0xf48b, + 0xf47e, 0xf365, 0xf43e, 0xf47f, + 0xf4ae, 0x3299, 0xf4af, 0xf44a, + 0xf4a8, 0xf4a9, 0x261d, 0xf250, + 0xf480, 0xf44d, 0xf469, 0x263a, + 0xf468, 0xf4ac, 0xf453, 0xf448, + 0xf449, 0xf46a, 0xf4fa, 0xf3a4, + 0xf45b, 0xf3b6, 0xf3b8, 0xf3bb, + 0xf3a7, 0xf484, 0xf52b, 0xf486, + 0xf4bf, 0xf45a, 0xf47d, 0xf199, + 0xf489, 0xf50a, 0xf514, 0xf340, + 0xf48d, 0xf4f7, 0x2702, 0xf3a5, + 0xf50d, 0xf511, 0xf460, 0xf4ea, + 0xf512, 0xf4db, 0xf4de, 0xf4e6, + 0xf4e0, 0x2709, 0x0031, 0x0032, + 0x0033, 0x0034, 0x0035, 0x0036, + 0x0037, 0x0038, 0x0039, 0xf51f, + 0xE82D, 0x25c0, 0x25b6, 0x23ea, + 0x23e9, 0x25ab, 0x25aa, 0x2139, + 0x25fd, 0x25fe, 0xf538, 0xf539, + 0x25fb, 0x25fc, 0x26aa, 0x26ab, + 0x2795, 0x2796, 0x2733, 0x2b06, + 0x2b07, 0xf6ab, 0xf53d, 0xf53c, + 0x23ec, 0x23eb, 0xf536, 0xf537, + 0x2b1c, 0x2b1b, 0xf534, 0xf535, + 0x2196, 0x2198, 0x2122, 0x2716, + 0x274c, 0x274e, 0x27a1, 0x2b05, + 0x2797, 0x2197, 0x2199, 0x2714, + 0x00a9, 0x00ae, 0xf53a, 0xf53b, + 0x21aa, 0x21a9, 0x2705, 0xf4dc, + 0xf4cd, 0xf4c3, 0xf4be, 0xf4c5, + 0xf4cb, 0xf4d7, 0xf4d8, 0xf4d9, + 0xf4d5, 0xf4c4, 0xf4c6, 0xf4d3, + 0xf4c7, 0xf4cc, 0xf4d2, 0xf4da, + 0xf4cf, 0x26fd, 0xf5fe, 0xf1fa, + 0xf4ca, 0xf4c8, 0xf4c9, 0xEE40, + 0xf193, 0xf4b2, 0x231a, 0x231b, + 0xf4b3, 0xf4b4, 0xf4f9, 0xf52a, + 0xf4fc, 0xf529, 0xf4bd, 0xf526, + 0xf50b, 0xf4b5, 0xE83C, 0xf527, + 0xf4f1, 0xf50c, 0xf517, 0xf4f0, + 0x2003, 0x2002, 0x2005, 0xf4c1, + 0xf4c2, 0xf4e8, 0xf4e4, 0xf4e5, + 0x23f0, 0x2764, 0x260e, 0x2615, + 0xf301, 0x26f3, 0xf3c0, 0xf4df, + 0xf3a8, 0xf3ad, 0xf3aa, 0xf380, + 0xf382, 0x2660, 0x2666, 0x2663, + 0xf440, 0xf442, 0x270c, 0x270b, + 0xf311, 0xf314, 0xf313, 0xf191, + 0x0030, 0xf197, 0xf635, 0xf49e, + 0xf4a5, 0xf4a6, 0xEE41, 0xf30f, + 0xf35c, 0xEB89, 0xf510, 0xf520, + 0xf521, 0xf522, 0xf523, 0xf251, + 0x2611, 0x2712, 0xf518, 0xf50e, + 0xf519, 0xf516, 0xf4f2, 0xf3e1, + 0xf4eb, 0xf4d1, 0xf50f, 0xf503, + 0xf195, 0xf455, 0xf45e, 0xf4bb, + 0xf4fb, 0xf339, 0x26ea, 0xf687, + 0xf5fb, 0xf3b5, 0xf47c, 0xf42f, + 0xf43b, 0xf42d, 0xf609, 0xf60d, + 0xf631, 0xf613, 0xf419, 0xf680, + 0xf451, 0xf48f, 0xf528, 0xf386, }; -const int mb_tbl_code2uni_sb1_min = 0x27a9; -const int mb_tbl_code2uni_sb1_max = 0x285a; +static const int mb_tbl_code2uni_sb1_min = 0x27a9; +static const int mb_tbl_code2uni_sb1_max = 0x2861; -const int mb_tbl_code2uni_sb1[] = { // 0x27a9 - 0x285a - 0x1f4eb, 0x1f4ee, 0x1f4e9, 0x1f4f2, - 0x1f61c, 0x1f60d, 0x1f631, 0x1f613, - 0x1f435, 0x1f419, 0x1f437, 0x1f47d, - 0x1f680, 0x1f451, 0x1f4a1, 0x1f340, - 0x1f48f, 0x1f381, 0x1f52b, 0x1f50d, - 0x1f3c3, 0x1f528, 0x1f386, 0x1f341, - 0x1f342, 0x1f47f, 0x1f47b, 0x1f480, - 0x1f525, 0x1f4bc, 0x1f4ba, 0x1f354, - 0x026f2, 0x026fa, 0x02668, 0x1f3a1, - 0x1f3ab, 0x1f4bf, 0x1f4c0, 0x1f4fb, - 0x1f4fc, 0x1f4fa, 0x1f47e, 0x0303d, - 0x1f004, 0x1f19a, 0x1f4b0, 0x1f3af, - 0x1f3c6, 0x1f3c1, 0x1f3b0, 0x1f40e, - 0x1f6a4, 0x1f6b2, 0x1f6a7, 0x1f6b9, - 0x1f6ba, 0x1f6bc, 0x1f489, 0x1f4a4, - 0x026a1, 0x1f460, 0x1f6c0, 0x1f6bd, - 0x1f50a, 0x1f4e2, 0x1f38c, 0x1f512, - 0x1f513, 0x1f306, 0x1f373, 0x1f4d6, - 0x1f4b1, 0x1f4b9, 0x1f4e1, 0x1f4aa, - 0x1f3e6, 0x1f6a5, 0x1f17f, 0x1f68f, - 0x1f6bb, 0x1f46e, 0x1f3e3, 0x1f3e7, - 0x1f3e5, 0x1f3ea, 0x1f3eb, 0x1f3e8, - 0x1f68c, 0x1f695, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x1f6b6, - 0x1f6a2, 0x1f201, 0x1f49f, 0x02734, - 0x02733, 0x1f51e, 0x1f6ad, 0x1f530, - 0x0267f, 0x1f4f6, 0x02665, 0x02666, - 0x02660, 0x02663, 0x00023, 0x00000, - 0x1f195, 0x1f199, 0x1f192, 0x1f236, - 0x1f21a, 0x1f237, 0x1f238, 0x1f534, - 0x1f532, 0x1f533, 0x00031, 0x00032, - 0x00033, 0x00034, 0x00035, 0x00036, - 0x00037, 0x00038, 0x00039, 0x00030, - 0x1f250, 0x1f239, 0x1f202, 0x1f194, - 0x1f235, 0x1f233, 0x1f22f, 0x1f23a, - 0x1f446, 0x1f447, 0x1f448, 0x1f449, - 0x02b06, 0x02b07, 0x027a1, 0x02b05, - 0x02197, 0x02196, 0x02198, 0x02199, - 0x025b6, 0x025c0, 0x023e9, 0x023ea, - 0x1f52f, 0x02648, 0x02649, 0x0264a, - 0x0264b, 0x0264c, 0x0264d, 0x0264e, - 0x0264f, 0x02650, 0x02651, 0x02652, - 0x02653, 0x026ce, 0x1f51d, 0x1f197, - 0x000a9, 0x000ae, 0x1f4f3, 0x1f4f4, - 0x026a0, 0x1f481, }; -const int mb_tbl_code2uni_sb2_min = 0x2921; -const int mb_tbl_code2uni_sb2_max = 0x29cc; +static const unsigned short mb_tbl_code2uni_sb1[] = { // 0x27a9 - 0x2861 + 0xf4eb, 0xf4ee, 0xf4e9, 0xf4f2, + 0xf61c, 0xf60d, 0xf631, 0xf613, + 0xf435, 0xf419, 0xf437, 0xf47d, + 0xf680, 0xf451, 0xf4a1, 0xf340, + 0xf48f, 0xf381, 0xf52b, 0xf50d, + 0xf3c3, 0xf528, 0xf386, 0xf341, + 0xf342, 0xf47f, 0xf47b, 0xf480, + 0xf525, 0xf4bc, 0xf4ba, 0xf354, + 0x26f2, 0x26fa, 0x2668, 0xf3a1, + 0xf3ab, 0xf4bf, 0xf4c0, 0xf4fb, + 0xf4fc, 0xf4fa, 0xf47e, 0x303d, + 0xf004, 0xf19a, 0xf4b0, 0xf3af, + 0xf3c6, 0xf3c1, 0xf3b0, 0xf40e, + 0xf6a4, 0xf6b2, 0xf6a7, 0xf6b9, + 0xf6ba, 0xf6bc, 0xf489, 0xf4a4, + 0x26a1, 0xf460, 0xf6c0, 0xf6bd, + 0xf50a, 0xf4e2, 0xf38c, 0xf512, + 0xf513, 0xf306, 0xf373, 0xf4d6, + 0xf4b1, 0xf4b9, 0xf4e1, 0xf4aa, + 0xf3e6, 0xf6a5, 0xf17f, 0xf68f, + 0xf6bb, 0xf46e, 0xf3e3, 0xf3e7, + 0xf3e5, 0xf3ea, 0xf3eb, 0xf3e8, + 0xf68c, 0xf695, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xf6b6, + 0xf6a2, 0xf201, 0xf49f, 0x2734, + 0x2733, 0xf51e, 0xf6ad, 0xf530, + 0x267f, 0xf4f6, 0x2665, 0x2666, + 0x2660, 0x2663, 0x0023, 0x0000, + 0xf195, 0xf199, 0xf192, 0xf236, + 0xf21a, 0xf237, 0xf238, 0xf534, + 0xf532, 0xf533, 0x0031, 0x0032, + 0x0033, 0x0034, 0x0035, 0x0036, + 0x0037, 0x0038, 0x0039, 0x0030, + 0xf250, 0xf239, 0xf202, 0xf194, + 0xf235, 0xf233, 0xf22f, 0xf23a, + 0xf446, 0xf447, 0xf448, 0xf449, + 0x2b06, 0x2b07, 0x27a1, 0x2b05, + 0x2197, 0x2196, 0x2198, 0x2199, + 0x25b6, 0x25c0, 0x23e9, 0x23ea, + 0xf52f, 0x2648, 0x2649, 0x264a, + 0x264b, 0x264c, 0x264d, 0x264e, + 0x264f, 0x2650, 0x2651, 0x2652, + 0x2653, 0x26ce, 0xf51d, 0xf197, + 0x00a9, 0x00ae, 0xf4f3, 0xf4f4, + 0x26a0, 0xf481, 0xEE77, 0xEE78, + 0xEE79, 0xEE7A, 0xEE7B, 0xEE7C, + 0xEE7D}; -const int mb_tbl_code2uni_sb2[] = { // 0x2921 - 0x29cc - 0x1f466, 0x1f467, 0x1f48b, 0x1f468, - 0x1f469, 0x1f455, 0x1f45f, 0x1f4f7, - 0x0260e, 0x1f4f1, 0x1f4e0, 0x1f4bb, - 0x1f44a, 0x1f44d, 0x0261d, 0x0270a, - 0x0270c, 0x0270b, 0x1f3bf, 0x026f3, - 0x1f3be, 0x026be, 0x1f3c4, 0x026bd, - 0x1f41f, 0x1f434, 0x1f697, 0x026f5, - 0x02708, 0x1f683, 0x1f685, 0x02753, - 0x02757, 0x02764, 0x1f494, 0x1f550, - 0x1f551, 0x1f552, 0x1f553, 0x1f554, - 0x1f555, 0x1f556, 0x1f557, 0x1f558, - 0x1f559, 0x1f55a, 0x1f55b, 0x1f338, - 0x1f531, 0x1f339, 0x1f384, 0x1f48d, - 0x1f48e, 0x1f3e0, 0x026ea, 0x1f3e2, - 0x1f689, 0x026fd, 0x1f5fb, 0x1f3a4, - 0x1f3a5, 0x1f3b5, 0x1f511, 0x1f3b7, - 0x1f3b8, 0x1f3ba, 0x1f374, 0x1f378, - 0x02615, 0x1f370, 0x1f37a, 0x026c4, - 0x02601, 0x02600, 0x02614, 0x1f319, - 0x1f304, 0x1f47c, 0x1f431, 0x1f42f, - 0x1f43b, 0x1f436, 0x1f42d, 0x1f433, - 0x1f427, 0x1f60a, 0x1f603, 0x1f61e, - 0x1f620, 0x1f4a9, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x1f4dd, - 0x1f454, 0x1f33a, 0x1f337, 0x1f33b, - 0x1f490, 0x1f334, 0x1f335, 0x1f6be, - 0x1f3a7, 0x1f376, 0x1f37b, 0x03297, - 0x1f6ac, 0x1f48a, 0x1f388, 0x1f4a3, - 0x1f389, 0x02702, 0x1f380, 0x03299, - 0x1f4bd, 0x1f4e3, 0x1f452, 0x1f457, - 0x1f461, 0x1f462, 0x1f484, 0x1f485, - 0x1f486, 0x1f487, 0x1f488, 0x1f458, - 0x1f459, 0x1f45c, 0x1f3ac, 0x1f514, - 0x1f3b6, 0x1f493, 0x1f497, 0x1f498, - 0x1f499, 0x1f49a, 0x1f49b, 0x1f49c, - 0x02728, 0x02b50, 0x1f4a8, 0x1f4a6, - 0x02b55, 0x0274c, 0x1f4a2, 0x1f31f, - 0x02754, 0x02755, 0x1f375, 0x1f35e, - 0x1f366, 0x1f35f, 0x1f361, 0x1f358, - 0x1f35a, 0x1f35d, 0x1f35c, 0x1f35b, - 0x1f359, 0x1f362, 0x1f363, 0x1f34e, - 0x1f34a, 0x1f353, 0x1f349, 0x1f345, - 0x1f346, 0x1f382, 0x1f371, 0x1f372, +static const int mb_tbl_code2uni_sb2_min = 0x2921; +static const int mb_tbl_code2uni_sb2_max = 0x29cc; + +static const unsigned short mb_tbl_code2uni_sb2[] = { // 0x2921 - 0x29cc + 0xf466, 0xf467, 0xf48b, 0xf468, + 0xf469, 0xf455, 0xf45f, 0xf4f7, + 0x260e, 0xf4f1, 0xf4e0, 0xf4bb, + 0xf44a, 0xf44d, 0x261d, 0x270a, + 0x270c, 0x270b, 0xf3bf, 0x26f3, + 0xf3be, 0x26be, 0xf3c4, 0x26bd, + 0xf41f, 0xf434, 0xf697, 0x26f5, + 0x2708, 0xf683, 0xf685, 0x2753, + 0x2757, 0x2764, 0xf494, 0xf550, + 0xf551, 0xf552, 0xf553, 0xf554, + 0xf555, 0xf556, 0xf557, 0xf558, + 0xf559, 0xf55a, 0xf55b, 0xf338, + 0xf531, 0xf339, 0xf384, 0xf48d, + 0xf48e, 0xf3e0, 0x26ea, 0xf3e2, + 0xf689, 0x26fd, 0xf5fb, 0xf3a4, + 0xf3a5, 0xf3b5, 0xf511, 0xf3b7, + 0xf3b8, 0xf3ba, 0xf374, 0xf378, + 0x2615, 0xf370, 0xf37a, 0x26c4, + 0x2601, 0x2600, 0x2614, 0xf319, + 0xf304, 0xf47c, 0xf431, 0xf42f, + 0xf43b, 0xf436, 0xf42d, 0xf433, + 0xf427, 0xf60a, 0xf603, 0xf61e, + 0xf620, 0xf4a9, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xf4dd, + 0xf454, 0xf33a, 0xf337, 0xf33b, + 0xf490, 0xf334, 0xf335, 0xf6be, + 0xf3a7, 0xf376, 0xf37b, 0x3297, + 0xf6ac, 0xf48a, 0xf388, 0xf4a3, + 0xf389, 0x2702, 0xf380, 0x3299, + 0xf4bd, 0xf4e3, 0xf452, 0xf457, + 0xf461, 0xf462, 0xf484, 0xf485, + 0xf486, 0xf487, 0xf488, 0xf458, + 0xf459, 0xf45c, 0xf3ac, 0xf514, + 0xf3b6, 0xf493, 0xf497, 0xf498, + 0xf499, 0xf49a, 0xf49b, 0xf49c, + 0x2728, 0x2b50, 0xf4a8, 0xf4a6, + 0x2b55, 0x274c, 0xf4a2, 0xf31f, + 0x2754, 0x2755, 0xf375, 0xf35e, + 0xf366, 0xf35f, 0xf361, 0xf358, + 0xf35a, 0xf35d, 0xf35c, 0xf35b, + 0xf359, 0xf362, 0xf363, 0xf34e, + 0xf34a, 0xf353, 0xf349, 0xf345, + 0xf346, 0xf382, 0xf371, 0xf372, }; -const int mb_tbl_code2uni_sb3_min = 0x2a99; -const int mb_tbl_code2uni_sb3_max = 0x2b2e; +static const int mb_tbl_code2uni_sb3_min = 0x2a99; +static const int mb_tbl_code2uni_sb3_max = 0x2b35; -const int mb_tbl_code2uni_sb3[] = { // 0x2a99 - 0x2b2e - 0x1f625, 0x1f60f, 0x1f614, 0x1f601, - 0x1f609, 0x1f623, 0x1f616, 0x1f62a, - 0x1f61d, 0x1f60c, 0x1f628, 0x1f637, - 0x1f633, 0x1f612, 0x1f630, 0x1f632, - 0x1f62d, 0x1f602, 0x1f622, 0x0263a, - 0x1f604, 0x1f621, 0x1f61a, 0x1f618, - 0x1f440, 0x1f443, 0x1f442, 0x1f444, - 0x1f64f, 0x1f44b, 0x1f44f, 0x1f44c, - 0x1f44e, 0x1f450, 0x1f645, 0x1f646, - 0x1f491, 0x1f647, 0x1f64c, 0x1f46b, - 0x1f46f, 0x1f3c0, 0x1f3c8, 0x1f3b1, - 0x1f3ca, 0x1f699, 0x1f69a, 0x1f692, - 0x1f691, 0x1f693, 0x1f3a2, 0x1f687, - 0x1f684, 0x1f38d, 0x1f49d, 0x1f38e, - 0x1f393, 0x1f392, 0x1f38f, 0x1f302, - 0x1f492, 0x1f30a, 0x1f367, 0x1f387, - 0x1f41a, 0x1f390, 0x1f300, 0x1f33e, - 0x1f383, 0x1f391, 0x1f343, 0x1f385, - 0x1f305, 0x1f307, 0x1f303, 0x1f308, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x00000, - 0x00000, 0x00000, 0x00000, 0x1f3e9, - 0x1f3a8, 0x1f3a9, 0x1f3ec, 0x1f3ef, - 0x1f3f0, 0x1f3a6, 0x1f3ed, 0x1f5fc, - 0x00000, 0x1f1ef, 0x1f1fa, 0x1f1eb, - 0x1f1e9, 0x1f1ee, 0x1f1ec, 0x1f1ea, - 0x1f1f7, 0x1f1e8, 0x1f1f0, 0x1f471, - 0x1f472, 0x1f473, 0x1f474, 0x1f475, - 0x1f476, 0x1f477, 0x1f478, 0x1f5fd, - 0x1f482, 0x1f483, 0x1f42c, 0x1f426, - 0x1f420, 0x1f424, 0x1f439, 0x1f41b, - 0x1f418, 0x1f428, 0x1f412, 0x1f411, - 0x1f43a, 0x1f42e, 0x1f430, 0x1f40d, - 0x1f414, 0x1f417, 0x1f42b, 0x1f438, - 0x1f170, 0x1f171, 0x1f18e, 0x1f17e, - 0x1f463, 0x02122, }; +static const unsigned short mb_tbl_code2uni_sb3[] = { // 0x2a99 - 0x2b35 + 0xf625, 0xf60f, 0xf614, 0xf601, + 0xf609, 0xf623, 0xf616, 0xf62a, + 0xf61d, 0xf60c, 0xf628, 0xf637, + 0xf633, 0xf612, 0xf630, 0xf632, + 0xf62d, 0xf602, 0xf622, 0x263a, + 0xf604, 0xf621, 0xf61a, 0xf618, + 0xf440, 0xf443, 0xf442, 0xf444, + 0xf64f, 0xf44b, 0xf44f, 0xf44c, + 0xf44e, 0xf450, 0xf645, 0xf646, + 0xf491, 0xf647, 0xf64c, 0xf46b, + 0xf46f, 0xf3c0, 0xf3c8, 0xf3b1, + 0xf3ca, 0xf699, 0xf69a, 0xf692, + 0xf691, 0xf693, 0xf3a2, 0xf687, + 0xf684, 0xf38d, 0xf49d, 0xf38e, + 0xf393, 0xf392, 0xf38f, 0xf302, + 0xf492, 0xf30a, 0xf367, 0xf387, + 0xf41a, 0xf390, 0xf300, 0xf33e, + 0xf383, 0xf391, 0xf343, 0xf385, + 0xf305, 0xf307, 0xf303, 0xf308, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xf3e9, + 0xf3a8, 0xf3a9, 0xf3ec, 0xf3ef, + 0xf3f0, 0xf3a6, 0xf3ed, 0xf5fc, + 0xE4C5, 0xf1ef, 0xf1fa, 0xf1eb, + 0xf1e9, 0xf1ee, 0xf1ec, 0xf1ea, + 0xf1f7, 0xf1e8, 0xf1f0, 0xf471, + 0xf472, 0xf473, 0xf474, 0xf475, + 0xf476, 0xf477, 0xf478, 0xf5fd, + 0xf482, 0xf483, 0xf42c, 0xf426, + 0xf420, 0xf424, 0xf439, 0xf41b, + 0xf418, 0xf428, 0xf412, 0xf411, + 0xf43a, 0xf42e, 0xf430, 0xf40d, + 0xf414, 0xf417, 0xf42b, 0xf438, + 0xf170, 0xf171, 0xf18e, 0xf17e, + 0xf463, 0x2122, 0xEE70, 0xEE71, + 0xEE72, 0xEE73, 0xEE74, 0xEE75, + 0xEE76}; -const int mb_tbl_uni_docomo2code1_min = 0x0023; -const int mb_tbl_uni_docomo2code1_max = 0x00ae; +static const int mb_tbl_uni_docomo2code1_min = 0x0023; +static const int mb_tbl_uni_docomo2code1_max = 0x00ae; -const int mb_tbl_uni_docomo2code1_key[] = { // 0x0023 - 0x00ae +static const unsigned short mb_tbl_uni_docomo2code1_key[] = { // 0x0023 - 0x00ae 0x0023, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00a9, 0x00ae, }; -const int mb_tbl_uni_docomo2code1_value[] = { // 0x0023 - 0x00ae +static const unsigned short mb_tbl_uni_docomo2code1_value[] = { // 0x0023 - 0x00ae 0x2964, 0x296f, 0x2966, 0x2967, 0x2968, 0x2969, 0x296a, 0x296b, 0x296c, 0x296d, 0x296e, 0x29b5, 0x29ba, }; +static const int mb_tbl_uni_docomo2code1_len = sizeof(mb_tbl_uni_docomo2code1_key)/sizeof(unsigned short); +static const int mb_tbl_uni_docomo2code2_min = 0x203c; +static const int mb_tbl_uni_docomo2code2_max = 0x3299; - - - - - - - - - - - - -const int mb_tbl_uni_docomo2code2_min = 0x203c; -const int mb_tbl_uni_docomo2code2_max = 0x3299; - -const int mb_tbl_uni_docomo2code2_key[] = { // 0x203c - 0x3299 +static const unsigned short mb_tbl_uni_docomo2code2_key[] = { // 0x203c - 0x3299 0x203c, 0x2049, 0x2122, 0x2194, 0x2195, 0x2196, 0x2197, 0x2198, 0x2199, 0x21a9, 0x231a, 0x23f0, @@ -436,7 +429,7 @@ const int mb_tbl_uni_docomo2code2_key[] = { // 0x203c - 0x3299 0x2764, 0x27b0, 0x2934, 0x2935, 0x3030, 0x3299, }; -const int mb_tbl_uni_docomo2code2_value[] = { // 0x203c - 0x3299 +static const unsigned short mb_tbl_uni_docomo2code2_value[] = { // 0x203c - 0x3299 0x2988, 0x2987, 0x29b6, 0x29c0, 0x29c1, 0x291b, 0x28fc, 0x291a, 0x2929, 0x295e, 0x29a3, 0x293e, @@ -454,56 +447,57 @@ const int mb_tbl_uni_docomo2code2_value[] = { // 0x203c - 0x3299 0x2970, 0x298e, 0x2979, 0x2984, 0x298d, 0x29b8, }; +static const int mb_tbl_uni_docomo2code2_len = sizeof(mb_tbl_uni_docomo2code2_key)/sizeof(unsigned short); -const int mb_tbl_uni_docomo2code3_min = 0x1f17f; -const int mb_tbl_uni_docomo2code3_max = 0x1f6bb; +static const int mb_tbl_uni_docomo2code3_min = 0x1f17f; +static const int mb_tbl_uni_docomo2code3_max = 0x1f6bb; -const int mb_tbl_uni_docomo2code3_key[] = { // 0x1f17f - 0x1f6bb - 0x1f17f, 0x1f191, 0x1f193, 0x1f194, - 0x1f195, 0x1f196, 0x1f197, 0x1f232, - 0x1f233, 0x1f234, 0x1f235, 0x1f300, - 0x1f301, 0x1f302, 0x1f303, 0x1f30a, - 0x1f311, 0x1f313, 0x1f314, 0x1f315, - 0x1f319, 0x1f331, 0x1f337, 0x1f338, - 0x1f340, 0x1f341, 0x1f34c, 0x1f34e, - 0x1f352, 0x1f354, 0x1f359, 0x1f35c, - 0x1f35e, 0x1f370, 0x1f374, 0x1f375, - 0x1f376, 0x1f377, 0x1f378, 0x1f37a, - 0x1f380, 0x1f381, 0x1f382, 0x1f384, - 0x1f3a0, 0x1f3a4, 0x1f3a5, 0x1f3a7, - 0x1f3a8, 0x1f3a9, 0x1f3aa, 0x1f3ab, - 0x1f3ac, 0x1f3ae, 0x1f3b5, 0x1f3b6, - 0x1f3bd, 0x1f3be, 0x1f3bf, 0x1f3c0, - 0x1f3c1, 0x1f3c2, 0x1f3c3, 0x1f3e0, - 0x1f3e2, 0x1f3e3, 0x1f3e5, 0x1f3e6, - 0x1f3e7, 0x1f3e8, 0x1f3ea, 0x1f3eb, - 0x1f40c, 0x1f41f, 0x1f424, 0x1f427, - 0x1f431, 0x1f434, 0x1f436, 0x1f437, - 0x1f440, 0x1f442, 0x1f44a, 0x1f44d, - 0x1f451, 0x1f453, 0x1f455, 0x1f456, - 0x1f45b, 0x1f45c, 0x1f45d, 0x1f45f, - 0x1f460, 0x1f463, 0x1f464, 0x1f484, - 0x1f48b, 0x1f48c, 0x1f48d, 0x1f493, - 0x1f494, 0x1f495, 0x1f4a0, 0x1f4a1, - 0x1f4a2, 0x1f4a3, 0x1f4a4, 0x1f4a5, - 0x1f4a6, 0x1f4a7, 0x1f4a8, 0x1f4b0, - 0x1f4b4, 0x1f4ba, 0x1f4bb, 0x1f4bf, - 0x1f4ce, 0x1f4d6, 0x1f4dd, 0x1f4df, - 0x1f4e0, 0x1f4e9, 0x1f4f1, 0x1f4f2, - 0x1f4f7, 0x1f4fa, 0x1f50d, 0x1f511, - 0x1f514, 0x1f51a, 0x1f51b, 0x1f51c, - 0x1f527, 0x1f5fb, 0x1f601, 0x1f603, - 0x1f605, 0x1f606, 0x1f609, 0x1f60b, - 0x1f60c, 0x1f60d, 0x1f60f, 0x1f612, - 0x1f613, 0x1f614, 0x1f616, 0x1f61c, - 0x1f61e, 0x1f620, 0x1f621, 0x1f622, - 0x1f623, 0x1f62d, 0x1f631, 0x1f635, - 0x1f683, 0x1f684, 0x1f68c, 0x1f697, - 0x1f699, 0x1f6a2, 0x1f6a5, 0x1f6a9, - 0x1f6aa, 0x1f6ac, 0x1f6ad, 0x1f6b2, - 0x1f6bb, }; +static const unsigned short mb_tbl_uni_docomo2code3_key[] = { // 0x1f17f - 0x1f6bb + 0xf17f, 0xf191, 0xf193, 0xf194, + 0xf195, 0xf196, 0xf197, 0xf232, + 0xf233, 0xf234, 0xf235, 0xf300, + 0xf301, 0xf302, 0xf303, 0xf30a, + 0xf311, 0xf313, 0xf314, 0xf315, + 0xf319, 0xf331, 0xf337, 0xf338, + 0xf340, 0xf341, 0xf34c, 0xf34e, + 0xf352, 0xf354, 0xf359, 0xf35c, + 0xf35e, 0xf370, 0xf374, 0xf375, + 0xf376, 0xf377, 0xf378, 0xf37a, + 0xf380, 0xf381, 0xf382, 0xf384, + 0xf3a0, 0xf3a4, 0xf3a5, 0xf3a7, + 0xf3a8, 0xf3a9, 0xf3aa, 0xf3ab, + 0xf3ac, 0xf3ae, 0xf3b5, 0xf3b6, + 0xf3bd, 0xf3be, 0xf3bf, 0xf3c0, + 0xf3c1, 0xf3c2, 0xf3c3, 0xf3e0, + 0xf3e2, 0xf3e3, 0xf3e5, 0xf3e6, + 0xf3e7, 0xf3e8, 0xf3ea, 0xf3eb, + 0xf40c, 0xf41f, 0xf424, 0xf427, + 0xf431, 0xf434, 0xf436, 0xf437, + 0xf440, 0xf442, 0xf44a, 0xf44d, + 0xf451, 0xf453, 0xf455, 0xf456, + 0xf45b, 0xf45c, 0xf45d, 0xf45f, + 0xf460, 0xf463, 0xf464, 0xf484, + 0xf48b, 0xf48c, 0xf48d, 0xf493, + 0xf494, 0xf495, 0xf4a0, 0xf4a1, + 0xf4a2, 0xf4a3, 0xf4a4, 0xf4a5, + 0xf4a6, 0xf4a7, 0xf4a8, 0xf4b0, + 0xf4b4, 0xf4ba, 0xf4bb, 0xf4bf, + 0xf4ce, 0xf4d6, 0xf4dd, 0xf4df, + 0xf4e0, 0xf4e9, 0xf4f1, 0xf4f2, + 0xf4f7, 0xf4fa, 0xf50d, 0xf511, + 0xf514, 0xf51a, 0xf51b, 0xf51c, + 0xf527, 0xf5fb, 0xf601, 0xf603, + 0xf605, 0xf606, 0xf609, 0xf60b, + 0xf60c, 0xf60d, 0xf60f, 0xf612, + 0xf613, 0xf614, 0xf616, 0xf61c, + 0xf61e, 0xf620, 0xf621, 0xf622, + 0xf623, 0xf62d, 0xf631, 0xf635, + 0xf683, 0xf684, 0xf68c, 0xf697, + 0xf699, 0xf6a2, 0xf6a5, 0xf6a9, + 0xf6aa, 0xf6ac, 0xf6ad, 0xf6b2, + 0xf6bb, }; -const int mb_tbl_uni_docomo2code3_value[] = { // 0x1f17f - 0x1f6bb +static const unsigned short mb_tbl_uni_docomo2code3_value[] = { // 0x1f17f - 0x1f6bb 0x28f0, 0x295f, 0x295b, 0x295c, 0x2961, 0x29b3, 0x298f, 0x29bc, 0x29bd, 0x29be, 0x29bf, 0x28c7, @@ -548,27 +542,29 @@ const int mb_tbl_uni_docomo2code3_value[] = { // 0x1f17f - 0x1f6bb 0x2998, 0x2903, 0x2904, 0x29a1, 0x28f2, }; +static const int mb_tbl_uni_docomo2code3_len = sizeof(mb_tbl_uni_docomo2code3_key)/sizeof(unsigned short); +static const int mb_tbl_uni_kddi2code1_min = 0x0023; +static const int mb_tbl_uni_kddi2code1_max = 0x00ae; -const int mb_tbl_uni_kddi2code1_min = 0x0023; -const int mb_tbl_uni_kddi2code1_max = 0x00ae; - -const int mb_tbl_uni_kddi2code1_key[] = { // 0x0023 - 0x00ae +static const unsigned short mb_tbl_uni_kddi2code1_key[] = { // 0x0023 - 0x00ae 0x0023, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00a9, 0x00ae, }; -const int mb_tbl_uni_kddi2code1_value[] = { // 0x0023 - 0x00ae +static const unsigned short mb_tbl_uni_kddi2code1_value[] = { // 0x0023 - 0x00ae 0x25bc, 0x2830, 0x27a6, 0x27a7, 0x27a8, 0x27a9, 0x27aa, 0x27ab, 0x27ac, 0x27ad, 0x27ae, 0x27dc, 0x27dd, }; -const int mb_tbl_uni_kddi2code2_min = 0x2002; -const int mb_tbl_uni_kddi2code2_max = 0x3299; +static const int mb_tbl_uni_kddi2code1_len = sizeof(mb_tbl_uni_kddi2code1_key)/sizeof(unsigned short); -const int mb_tbl_uni_kddi2code2_key[] = { // 0x2002 - 0x3299 +static const int mb_tbl_uni_kddi2code2_min = 0x2002; +static const int mb_tbl_uni_kddi2code2_max = 0x3299; + +static const unsigned short mb_tbl_uni_kddi2code2_key[] = { // 0x2002 - 0x3299 0x2002, 0x2003, 0x2005, 0x203c, 0x2049, 0x2122, 0x2139, 0x2194, 0x2195, 0x2196, 0x2197, 0x2198, @@ -599,7 +595,7 @@ const int mb_tbl_uni_kddi2code2_key[] = { // 0x2002 - 0x3299 0x2b50, 0x2b55, 0x3297, 0x3299, }; -const int mb_tbl_uni_kddi2code2_value[] = { // 0x2002 - 0x3299 +static const unsigned short mb_tbl_uni_kddi2code2_value[] = { // 0x2002 - 0x3299 0x2811, 0x2810, 0x2812, 0x2568, 0x2567, 0x27d2, 0x27b7, 0x25b2, 0x25b3, 0x27d0, 0x27d9, 0x27d1, @@ -630,140 +626,142 @@ const int mb_tbl_uni_kddi2code2_value[] = { // 0x2002 - 0x3299 0x270f, 0x24f8, 0x24e4, 0x2775, }; -const int mb_tbl_uni_kddi2code3_min = 0x1f004; -const int mb_tbl_uni_kddi2code3_max = 0x1f6c0; +static const int mb_tbl_uni_kddi2code2_len = sizeof(mb_tbl_uni_kddi2code2_key)/sizeof(unsigned short); -const int mb_tbl_uni_kddi2code3_key[] = { // 0x1f004 - 0x1f6c0 - 0x1f004, 0x1f0cf, 0x1f170, 0x1f171, - 0x1f17e, 0x1f17f, 0x1f18e, 0x1f191, - 0x1f192, 0x1f193, 0x1f194, 0x1f195, - 0x1f197, 0x1f198, 0x1f199, 0x1f19a, - 0x1f1e8, 0x1f1e9, 0x1f1ea, 0x1f1eb, - 0x1f1ec, 0x1f1ee, 0x1f1ef, 0x1f1f0, - 0x1f1f7, 0x1f1fa, 0x1f202, 0x1f22f, - 0x1f233, 0x1f235, 0x1f239, 0x1f23a, - 0x1f250, 0x1f251, 0x1f300, 0x1f301, - 0x1f302, 0x1f303, 0x1f305, 0x1f306, - 0x1f308, 0x1f309, 0x1f30a, 0x1f30b, - 0x1f30c, 0x1f30f, 0x1f311, 0x1f313, - 0x1f314, 0x1f319, 0x1f31b, 0x1f320, - 0x1f330, 0x1f331, 0x1f334, 0x1f335, - 0x1f337, 0x1f338, 0x1f339, 0x1f33a, - 0x1f33b, 0x1f33c, 0x1f33d, 0x1f33f, - 0x1f340, 0x1f341, 0x1f342, 0x1f344, - 0x1f345, 0x1f346, 0x1f347, 0x1f348, - 0x1f349, 0x1f34a, 0x1f34c, 0x1f34d, - 0x1f34e, 0x1f34f, 0x1f351, 0x1f352, - 0x1f353, 0x1f354, 0x1f355, 0x1f356, - 0x1f357, 0x1f358, 0x1f359, 0x1f35a, - 0x1f35b, 0x1f35c, 0x1f35d, 0x1f35e, - 0x1f35f, 0x1f360, 0x1f361, 0x1f362, - 0x1f363, 0x1f364, 0x1f365, 0x1f366, - 0x1f367, 0x1f368, 0x1f369, 0x1f36a, - 0x1f36b, 0x1f36c, 0x1f36d, 0x1f36e, - 0x1f36f, 0x1f370, 0x1f371, 0x1f372, - 0x1f373, 0x1f374, 0x1f375, 0x1f376, - 0x1f377, 0x1f378, 0x1f379, 0x1f37a, - 0x1f37b, 0x1f380, 0x1f381, 0x1f382, - 0x1f383, 0x1f384, 0x1f385, 0x1f386, - 0x1f387, 0x1f388, 0x1f389, 0x1f38a, - 0x1f38b, 0x1f38c, 0x1f38d, 0x1f38e, - 0x1f38f, 0x1f390, 0x1f391, 0x1f392, - 0x1f393, 0x1f3a1, 0x1f3a2, 0x1f3a3, - 0x1f3a4, 0x1f3a5, 0x1f3a7, 0x1f3a8, - 0x1f3a9, 0x1f3aa, 0x1f3ab, 0x1f3ac, - 0x1f3ad, 0x1f3ae, 0x1f3af, 0x1f3b0, - 0x1f3b1, 0x1f3b2, 0x1f3b3, 0x1f3b4, - 0x1f3b5, 0x1f3b6, 0x1f3b8, 0x1f3b9, - 0x1f3ba, 0x1f3bb, 0x1f3bc, 0x1f3be, - 0x1f3bf, 0x1f3c0, 0x1f3c1, 0x1f3c2, - 0x1f3c3, 0x1f3c4, 0x1f3c6, 0x1f3c8, - 0x1f3ca, 0x1f3e0, 0x1f3e1, 0x1f3e2, - 0x1f3e3, 0x1f3e5, 0x1f3e6, 0x1f3e7, - 0x1f3e8, 0x1f3e9, 0x1f3ea, 0x1f3eb, - 0x1f3ec, 0x1f3ed, 0x1f3ee, 0x1f3ef, - 0x1f3f0, 0x1f40c, 0x1f40d, 0x1f414, - 0x1f417, 0x1f418, 0x1f419, 0x1f41a, - 0x1f41b, 0x1f41c, 0x1f41d, 0x1f41e, - 0x1f420, 0x1f421, 0x1f422, 0x1f423, - 0x1f424, 0x1f425, 0x1f427, 0x1f428, - 0x1f429, 0x1f42b, 0x1f42c, 0x1f42d, - 0x1f42e, 0x1f42f, 0x1f430, 0x1f431, - 0x1f432, 0x1f433, 0x1f434, 0x1f435, - 0x1f436, 0x1f437, 0x1f438, 0x1f43b, - 0x1f43c, 0x1f43d, 0x1f43e, 0x1f440, - 0x1f442, 0x1f443, 0x1f444, 0x1f445, - 0x1f446, 0x1f447, 0x1f448, 0x1f449, - 0x1f44a, 0x1f44b, 0x1f44c, 0x1f44d, - 0x1f44e, 0x1f44f, 0x1f451, 0x1f452, - 0x1f453, 0x1f454, 0x1f455, 0x1f456, - 0x1f457, 0x1f458, 0x1f459, 0x1f45a, - 0x1f45b, 0x1f45c, 0x1f45e, 0x1f45f, - 0x1f460, 0x1f462, 0x1f463, 0x1f468, - 0x1f469, 0x1f46a, 0x1f46e, 0x1f46f, - 0x1f470, 0x1f471, 0x1f472, 0x1f473, - 0x1f474, 0x1f475, 0x1f476, 0x1f477, - 0x1f478, 0x1f479, 0x1f47a, 0x1f47b, - 0x1f47c, 0x1f47d, 0x1f47e, 0x1f47f, - 0x1f480, 0x1f483, 0x1f484, 0x1f485, - 0x1f486, 0x1f487, 0x1f488, 0x1f489, - 0x1f48a, 0x1f48b, 0x1f48c, 0x1f48d, - 0x1f48f, 0x1f490, 0x1f491, 0x1f493, - 0x1f494, 0x1f495, 0x1f496, 0x1f498, - 0x1f499, 0x1f49a, 0x1f49b, 0x1f49c, - 0x1f49d, 0x1f49e, 0x1f4a1, 0x1f4a2, - 0x1f4a3, 0x1f4a4, 0x1f4a5, 0x1f4a6, - 0x1f4a7, 0x1f4a8, 0x1f4a9, 0x1f4aa, - 0x1f4ab, 0x1f4ac, 0x1f4ae, 0x1f4af, - 0x1f4b0, 0x1f4b2, 0x1f4b3, 0x1f4b4, - 0x1f4b5, 0x1f4b8, 0x1f4b9, 0x1f4bb, - 0x1f4bc, 0x1f4bd, 0x1f4be, 0x1f4bf, - 0x1f4c1, 0x1f4c2, 0x1f4c3, 0x1f4c4, - 0x1f4c5, 0x1f4c6, 0x1f4c7, 0x1f4c8, - 0x1f4c9, 0x1f4ca, 0x1f4cb, 0x1f4cc, - 0x1f4cd, 0x1f4ce, 0x1f4cf, 0x1f4d0, - 0x1f4d1, 0x1f4d2, 0x1f4d3, 0x1f4d4, - 0x1f4d5, 0x1f4d6, 0x1f4d7, 0x1f4d8, - 0x1f4d9, 0x1f4da, 0x1f4db, 0x1f4dc, - 0x1f4dd, 0x1f4de, 0x1f4df, 0x1f4e0, - 0x1f4e1, 0x1f4e4, 0x1f4e5, 0x1f4e6, - 0x1f4e7, 0x1f4e8, 0x1f4e9, 0x1f4ea, - 0x1f4eb, 0x1f4f0, 0x1f4f1, 0x1f4f2, - 0x1f4f3, 0x1f4f4, 0x1f4f6, 0x1f4f7, - 0x1f4f9, 0x1f4fa, 0x1f4fb, 0x1f4fc, - 0x1f503, 0x1f50a, 0x1f50b, 0x1f50c, - 0x1f50d, 0x1f50e, 0x1f50f, 0x1f510, - 0x1f511, 0x1f512, 0x1f514, 0x1f516, - 0x1f517, 0x1f518, 0x1f519, 0x1f51e, - 0x1f51f, 0x1f520, 0x1f521, 0x1f522, - 0x1f523, 0x1f524, 0x1f525, 0x1f526, - 0x1f527, 0x1f528, 0x1f529, 0x1f52a, - 0x1f52b, 0x1f52e, 0x1f530, 0x1f534, - 0x1f535, 0x1f536, 0x1f537, 0x1f538, - 0x1f539, 0x1f53a, 0x1f53b, 0x1f53c, - 0x1f53d, 0x1f5fb, 0x1f5fc, 0x1f5fe, - 0x1f5ff, 0x1f601, 0x1f602, 0x1f603, - 0x1f609, 0x1f60a, 0x1f60c, 0x1f60d, - 0x1f60f, 0x1f612, 0x1f613, 0x1f614, - 0x1f616, 0x1f618, 0x1f61a, 0x1f61c, - 0x1f620, 0x1f621, 0x1f622, 0x1f623, - 0x1f624, 0x1f628, 0x1f629, 0x1f62a, - 0x1f62b, 0x1f62d, 0x1f630, 0x1f631, - 0x1f632, 0x1f633, 0x1f635, 0x1f637, - 0x1f638, 0x1f639, 0x1f63a, 0x1f63b, - 0x1f63c, 0x1f63d, 0x1f63e, 0x1f63f, - 0x1f640, 0x1f645, 0x1f646, 0x1f647, - 0x1f648, 0x1f649, 0x1f64a, 0x1f64b, - 0x1f64c, 0x1f64d, 0x1f64e, 0x1f64f, - 0x1f680, 0x1f683, 0x1f685, 0x1f687, - 0x1f689, 0x1f68c, 0x1f68f, 0x1f691, - 0x1f692, 0x1f693, 0x1f697, 0x1f69a, - 0x1f6a2, 0x1f6a5, 0x1f6a7, 0x1f6a8, - 0x1f6a9, 0x1f6ab, 0x1f6ac, 0x1f6ad, - 0x1f6b2, 0x1f6b6, 0x1f6bb, 0x1f6c0, +static const int mb_tbl_uni_kddi2code3_min = 0x1f004; +static const int mb_tbl_uni_kddi2code3_max = 0x1f6c0; + +static const unsigned short mb_tbl_uni_kddi2code3_key[] = { // 0x1f004 - 0x1f6c0 + 0xf004, 0xf0cf, 0xf170, 0xf171, + 0xf17e, 0xf17f, 0xf18e, 0xf191, + 0xf192, 0xf193, 0xf194, 0xf195, + 0xf197, 0xf198, 0xf199, 0xf19a, + 0xf1e8, 0xf1e9, 0xf1ea, 0xf1eb, + 0xf1ec, 0xf1ee, 0xf1ef, 0xf1f0, + 0xf1f7, 0xf1fa, 0xf202, 0xf22f, + 0xf233, 0xf235, 0xf239, 0xf23a, + 0xf250, 0xf251, 0xf300, 0xf301, + 0xf302, 0xf303, 0xf305, 0xf306, + 0xf308, 0xf309, 0xf30a, 0xf30b, + 0xf30c, 0xf30f, 0xf311, 0xf313, + 0xf314, 0xf319, 0xf31b, 0xf320, + 0xf330, 0xf331, 0xf334, 0xf335, + 0xf337, 0xf338, 0xf339, 0xf33a, + 0xf33b, 0xf33c, 0xf33d, 0xf33f, + 0xf340, 0xf341, 0xf342, 0xf344, + 0xf345, 0xf346, 0xf347, 0xf348, + 0xf349, 0xf34a, 0xf34c, 0xf34d, + 0xf34e, 0xf34f, 0xf351, 0xf352, + 0xf353, 0xf354, 0xf355, 0xf356, + 0xf357, 0xf358, 0xf359, 0xf35a, + 0xf35b, 0xf35c, 0xf35d, 0xf35e, + 0xf35f, 0xf360, 0xf361, 0xf362, + 0xf363, 0xf364, 0xf365, 0xf366, + 0xf367, 0xf368, 0xf369, 0xf36a, + 0xf36b, 0xf36c, 0xf36d, 0xf36e, + 0xf36f, 0xf370, 0xf371, 0xf372, + 0xf373, 0xf374, 0xf375, 0xf376, + 0xf377, 0xf378, 0xf379, 0xf37a, + 0xf37b, 0xf380, 0xf381, 0xf382, + 0xf383, 0xf384, 0xf385, 0xf386, + 0xf387, 0xf388, 0xf389, 0xf38a, + 0xf38b, 0xf38c, 0xf38d, 0xf38e, + 0xf38f, 0xf390, 0xf391, 0xf392, + 0xf393, 0xf3a1, 0xf3a2, 0xf3a3, + 0xf3a4, 0xf3a5, 0xf3a7, 0xf3a8, + 0xf3a9, 0xf3aa, 0xf3ab, 0xf3ac, + 0xf3ad, 0xf3ae, 0xf3af, 0xf3b0, + 0xf3b1, 0xf3b2, 0xf3b3, 0xf3b4, + 0xf3b5, 0xf3b6, 0xf3b8, 0xf3b9, + 0xf3ba, 0xf3bb, 0xf3bc, 0xf3be, + 0xf3bf, 0xf3c0, 0xf3c1, 0xf3c2, + 0xf3c3, 0xf3c4, 0xf3c6, 0xf3c8, + 0xf3ca, 0xf3e0, 0xf3e1, 0xf3e2, + 0xf3e3, 0xf3e5, 0xf3e6, 0xf3e7, + 0xf3e8, 0xf3e9, 0xf3ea, 0xf3eb, + 0xf3ec, 0xf3ed, 0xf3ee, 0xf3ef, + 0xf3f0, 0xf40c, 0xf40d, 0xf414, + 0xf417, 0xf418, 0xf419, 0xf41a, + 0xf41b, 0xf41c, 0xf41d, 0xf41e, + 0xf420, 0xf421, 0xf422, 0xf423, + 0xf424, 0xf425, 0xf427, 0xf428, + 0xf429, 0xf42b, 0xf42c, 0xf42d, + 0xf42e, 0xf42f, 0xf430, 0xf431, + 0xf432, 0xf433, 0xf434, 0xf435, + 0xf436, 0xf437, 0xf438, 0xf43b, + 0xf43c, 0xf43d, 0xf43e, 0xf440, + 0xf442, 0xf443, 0xf444, 0xf445, + 0xf446, 0xf447, 0xf448, 0xf449, + 0xf44a, 0xf44b, 0xf44c, 0xf44d, + 0xf44e, 0xf44f, 0xf451, 0xf452, + 0xf453, 0xf454, 0xf455, 0xf456, + 0xf457, 0xf458, 0xf459, 0xf45a, + 0xf45b, 0xf45c, 0xf45e, 0xf45f, + 0xf460, 0xf462, 0xf463, 0xf468, + 0xf469, 0xf46a, 0xf46e, 0xf46f, + 0xf470, 0xf471, 0xf472, 0xf473, + 0xf474, 0xf475, 0xf476, 0xf477, + 0xf478, 0xf479, 0xf47a, 0xf47b, + 0xf47c, 0xf47d, 0xf47e, 0xf47f, + 0xf480, 0xf483, 0xf484, 0xf485, + 0xf486, 0xf487, 0xf488, 0xf489, + 0xf48a, 0xf48b, 0xf48c, 0xf48d, + 0xf48f, 0xf490, 0xf491, 0xf493, + 0xf494, 0xf495, 0xf496, 0xf498, + 0xf499, 0xf49a, 0xf49b, 0xf49c, + 0xf49d, 0xf49e, 0xf4a1, 0xf4a2, + 0xf4a3, 0xf4a4, 0xf4a5, 0xf4a6, + 0xf4a7, 0xf4a8, 0xf4a9, 0xf4aa, + 0xf4ab, 0xf4ac, 0xf4ae, 0xf4af, + 0xf4b0, 0xf4b2, 0xf4b3, 0xf4b4, + 0xf4b5, 0xf4b8, 0xf4b9, 0xf4bb, + 0xf4bc, 0xf4bd, 0xf4be, 0xf4bf, + 0xf4c1, 0xf4c2, 0xf4c3, 0xf4c4, + 0xf4c5, 0xf4c6, 0xf4c7, 0xf4c8, + 0xf4c9, 0xf4ca, 0xf4cb, 0xf4cc, + 0xf4cd, 0xf4ce, 0xf4cf, 0xf4d0, + 0xf4d1, 0xf4d2, 0xf4d3, 0xf4d4, + 0xf4d5, 0xf4d6, 0xf4d7, 0xf4d8, + 0xf4d9, 0xf4da, 0xf4db, 0xf4dc, + 0xf4dd, 0xf4de, 0xf4df, 0xf4e0, + 0xf4e1, 0xf4e4, 0xf4e5, 0xf4e6, + 0xf4e7, 0xf4e8, 0xf4e9, 0xf4ea, + 0xf4eb, 0xf4f0, 0xf4f1, 0xf4f2, + 0xf4f3, 0xf4f4, 0xf4f6, 0xf4f7, + 0xf4f9, 0xf4fa, 0xf4fb, 0xf4fc, + 0xf503, 0xf50a, 0xf50b, 0xf50c, + 0xf50d, 0xf50e, 0xf50f, 0xf510, + 0xf511, 0xf512, 0xf514, 0xf516, + 0xf517, 0xf518, 0xf519, 0xf51e, + 0xf51f, 0xf520, 0xf521, 0xf522, + 0xf523, 0xf524, 0xf525, 0xf526, + 0xf527, 0xf528, 0xf529, 0xf52a, + 0xf52b, 0xf52e, 0xf530, 0xf534, + 0xf535, 0xf536, 0xf537, 0xf538, + 0xf539, 0xf53a, 0xf53b, 0xf53c, + 0xf53d, 0xf5fb, 0xf5fc, 0xf5fe, + 0xf5ff, 0xf601, 0xf602, 0xf603, + 0xf609, 0xf60a, 0xf60c, 0xf60d, + 0xf60f, 0xf612, 0xf613, 0xf614, + 0xf616, 0xf618, 0xf61a, 0xf61c, + 0xf620, 0xf621, 0xf622, 0xf623, + 0xf624, 0xf628, 0xf629, 0xf62a, + 0xf62b, 0xf62d, 0xf630, 0xf631, + 0xf632, 0xf633, 0xf635, 0xf637, + 0xf638, 0xf639, 0xf63a, 0xf63b, + 0xf63c, 0xf63d, 0xf63e, 0xf63f, + 0xf640, 0xf645, 0xf646, 0xf647, + 0xf648, 0xf649, 0xf64a, 0xf64b, + 0xf64c, 0xf64d, 0xf64e, 0xf64f, + 0xf680, 0xf683, 0xf685, 0xf687, + 0xf689, 0xf68c, 0xf68f, 0xf691, + 0xf692, 0xf693, 0xf697, 0xf69a, + 0xf6a2, 0xf6a5, 0xf6a7, 0xf6a8, + 0xf6a9, 0xf6ab, 0xf6ac, 0xf6ad, + 0xf6b2, 0xf6b6, 0xf6bb, 0xf6c0, }; -const int mb_tbl_uni_kddi2code3_value[] = { // 0x1f004 - 0x1f6c0 +static const unsigned short mb_tbl_uni_kddi2code3_value[] = { // 0x1f004 - 0x1f6c0 0x24bc, 0x25a7, 0x255e, 0x255f, 0x2560, 0x272a, 0x2561, 0x282f, 0x24d0, 0x27fc, 0x24d3, 0x284c, @@ -893,27 +891,29 @@ const int mb_tbl_uni_kddi2code3_value[] = { // 0x1f004 - 0x1f6c0 0x2732, 0x25aa, 0x2729, 0x24c3, }; +static const int mb_tbl_uni_kddi2code3_len = sizeof(mb_tbl_uni_kddi2code3_key)/sizeof(unsigned short); +static const int mb_tbl_uni_sb2code1_min = 0x0023; +static const int mb_tbl_uni_sb2code1_max = 0x00ae; -const int mb_tbl_uni_sb2code1_min = 0x0023; -const int mb_tbl_uni_sb2code1_max = 0x00ae; - -const int mb_tbl_uni_sb2code1_key[] = { // 0x0023 - 0x00ae +static const unsigned short mb_tbl_uni_sb2code1_key[] = { // 0x0023 - 0x00ae 0x0023, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00a9, 0x00ae, }; -const int mb_tbl_uni_sb2code1_value[] = { // 0x0023 - 0x00ae +static const unsigned short mb_tbl_uni_sb2code1_value[] = { // 0x0023 - 0x00ae 0x2817, 0x282c, 0x2823, 0x2824, 0x2825, 0x2826, 0x2827, 0x2828, 0x2829, 0x282a, 0x282b, 0x2855, 0x2856, }; -const int mb_tbl_uni_sb2code2_min = 0x2122; -const int mb_tbl_uni_sb2code2_max = 0x3299; +static const int mb_tbl_uni_sb2code1_len = sizeof(mb_tbl_uni_sb2code1_key)/sizeof(unsigned short); -const int mb_tbl_uni_sb2code2_key[] = { // 0x2122 - 0x3299 +static const int mb_tbl_uni_sb2code2_min = 0x2122; +static const int mb_tbl_uni_sb2code2_max = 0x3299; + +static const unsigned short mb_tbl_uni_sb2code2_key[] = { // 0x2122 - 0x3299 0x2122, 0x2196, 0x2197, 0x2198, 0x2199, 0x23e9, 0x23ea, 0x25b6, 0x25c0, 0x2600, 0x2601, 0x260e, @@ -933,7 +933,7 @@ const int mb_tbl_uni_sb2code2_key[] = { // 0x2122 - 0x3299 0x2b50, 0x2b55, 0x303d, 0x3297, 0x3299, }; -const int mb_tbl_uni_sb2code2_value[] = { // 0x2122 - 0x3299 +static const unsigned short mb_tbl_uni_sb2code2_value[] = { // 0x2122 - 0x3299 0x2b2e, 0x283e, 0x283d, 0x283f, 0x2840, 0x2843, 0x2844, 0x2841, 0x2842, 0x296a, 0x2969, 0x2929, @@ -953,109 +953,111 @@ const int mb_tbl_uni_sb2code2_value[] = { // 0x2122 - 0x3299 0x29ae, 0x29b1, 0x27d4, 0x298c, 0x2994, }; -const int mb_tbl_uni_sb2code3_min = 0x1f004; -const int mb_tbl_uni_sb2code3_max = 0x1f6c0; +static const int mb_tbl_uni_sb2code2_len = sizeof(mb_tbl_uni_sb2code2_key)/sizeof(unsigned short); -const int mb_tbl_uni_sb2code3_key[] = { // 0x1f004 - 0x1f6c0 - 0x1f004, 0x1f170, 0x1f171, 0x1f17e, - 0x1f17f, 0x1f18e, 0x1f192, 0x1f194, - 0x1f195, 0x1f197, 0x1f199, 0x1f19a, - 0x1f1e8, 0x1f1e9, 0x1f1ea, 0x1f1eb, - 0x1f1ec, 0x1f1ee, 0x1f1ef, 0x1f1f0, - 0x1f1f7, 0x1f1fa, 0x1f201, 0x1f202, - 0x1f21a, 0x1f22f, 0x1f233, 0x1f235, - 0x1f236, 0x1f237, 0x1f238, 0x1f239, - 0x1f23a, 0x1f250, 0x1f300, 0x1f302, - 0x1f303, 0x1f304, 0x1f305, 0x1f306, - 0x1f307, 0x1f308, 0x1f30a, 0x1f319, - 0x1f31f, 0x1f334, 0x1f335, 0x1f337, - 0x1f338, 0x1f339, 0x1f33a, 0x1f33b, - 0x1f33e, 0x1f340, 0x1f341, 0x1f342, - 0x1f343, 0x1f345, 0x1f346, 0x1f349, - 0x1f34a, 0x1f34e, 0x1f353, 0x1f354, - 0x1f358, 0x1f359, 0x1f35a, 0x1f35b, - 0x1f35c, 0x1f35d, 0x1f35e, 0x1f35f, - 0x1f361, 0x1f362, 0x1f363, 0x1f366, - 0x1f367, 0x1f370, 0x1f371, 0x1f372, - 0x1f373, 0x1f374, 0x1f375, 0x1f376, - 0x1f378, 0x1f37a, 0x1f37b, 0x1f380, - 0x1f381, 0x1f382, 0x1f383, 0x1f384, - 0x1f385, 0x1f386, 0x1f387, 0x1f388, - 0x1f389, 0x1f38c, 0x1f38d, 0x1f38e, - 0x1f38f, 0x1f390, 0x1f391, 0x1f392, - 0x1f393, 0x1f3a1, 0x1f3a2, 0x1f3a4, - 0x1f3a5, 0x1f3a6, 0x1f3a7, 0x1f3a8, - 0x1f3a9, 0x1f3ab, 0x1f3ac, 0x1f3af, - 0x1f3b0, 0x1f3b1, 0x1f3b5, 0x1f3b6, - 0x1f3b7, 0x1f3b8, 0x1f3ba, 0x1f3be, - 0x1f3bf, 0x1f3c0, 0x1f3c1, 0x1f3c3, - 0x1f3c4, 0x1f3c6, 0x1f3c8, 0x1f3ca, - 0x1f3e0, 0x1f3e2, 0x1f3e3, 0x1f3e5, - 0x1f3e6, 0x1f3e7, 0x1f3e8, 0x1f3e9, - 0x1f3ea, 0x1f3eb, 0x1f3ec, 0x1f3ed, - 0x1f3ef, 0x1f3f0, 0x1f40d, 0x1f40e, - 0x1f411, 0x1f412, 0x1f414, 0x1f417, - 0x1f418, 0x1f419, 0x1f41a, 0x1f41b, - 0x1f41f, 0x1f420, 0x1f424, 0x1f426, - 0x1f427, 0x1f428, 0x1f42b, 0x1f42c, - 0x1f42d, 0x1f42e, 0x1f42f, 0x1f430, - 0x1f431, 0x1f433, 0x1f434, 0x1f435, - 0x1f436, 0x1f437, 0x1f438, 0x1f439, - 0x1f43a, 0x1f43b, 0x1f440, 0x1f442, - 0x1f443, 0x1f444, 0x1f446, 0x1f447, - 0x1f448, 0x1f449, 0x1f44a, 0x1f44b, - 0x1f44c, 0x1f44d, 0x1f44e, 0x1f44f, - 0x1f450, 0x1f451, 0x1f452, 0x1f454, - 0x1f455, 0x1f457, 0x1f458, 0x1f459, - 0x1f45c, 0x1f45f, 0x1f460, 0x1f461, - 0x1f462, 0x1f463, 0x1f466, 0x1f467, - 0x1f468, 0x1f469, 0x1f46b, 0x1f46e, - 0x1f46f, 0x1f471, 0x1f472, 0x1f473, - 0x1f474, 0x1f475, 0x1f476, 0x1f477, - 0x1f478, 0x1f47b, 0x1f47c, 0x1f47d, - 0x1f47e, 0x1f47f, 0x1f480, 0x1f481, - 0x1f482, 0x1f483, 0x1f484, 0x1f485, - 0x1f486, 0x1f487, 0x1f488, 0x1f489, - 0x1f48a, 0x1f48b, 0x1f48d, 0x1f48e, - 0x1f48f, 0x1f490, 0x1f491, 0x1f492, - 0x1f493, 0x1f494, 0x1f497, 0x1f498, - 0x1f499, 0x1f49a, 0x1f49b, 0x1f49c, - 0x1f49d, 0x1f49f, 0x1f4a1, 0x1f4a2, - 0x1f4a3, 0x1f4a4, 0x1f4a6, 0x1f4a8, - 0x1f4a9, 0x1f4aa, 0x1f4b0, 0x1f4b1, - 0x1f4b9, 0x1f4ba, 0x1f4bb, 0x1f4bc, - 0x1f4bd, 0x1f4bf, 0x1f4c0, 0x1f4d6, - 0x1f4dd, 0x1f4e0, 0x1f4e1, 0x1f4e2, - 0x1f4e3, 0x1f4e9, 0x1f4eb, 0x1f4ee, - 0x1f4f1, 0x1f4f2, 0x1f4f3, 0x1f4f4, - 0x1f4f6, 0x1f4f7, 0x1f4fa, 0x1f4fb, - 0x1f4fc, 0x1f50a, 0x1f50d, 0x1f511, - 0x1f512, 0x1f513, 0x1f514, 0x1f51d, - 0x1f51e, 0x1f525, 0x1f528, 0x1f52b, - 0x1f52f, 0x1f530, 0x1f531, 0x1f532, - 0x1f533, 0x1f534, 0x1f550, 0x1f551, - 0x1f552, 0x1f553, 0x1f554, 0x1f555, - 0x1f556, 0x1f557, 0x1f558, 0x1f559, - 0x1f55a, 0x1f55b, 0x1f5fb, 0x1f5fc, - 0x1f5fd, 0x1f601, 0x1f602, 0x1f603, - 0x1f604, 0x1f609, 0x1f60a, 0x1f60c, - 0x1f60d, 0x1f60f, 0x1f612, 0x1f613, - 0x1f614, 0x1f616, 0x1f618, 0x1f61a, - 0x1f61c, 0x1f61d, 0x1f61e, 0x1f620, - 0x1f621, 0x1f622, 0x1f623, 0x1f625, - 0x1f628, 0x1f62a, 0x1f62d, 0x1f630, - 0x1f631, 0x1f632, 0x1f633, 0x1f637, - 0x1f645, 0x1f646, 0x1f647, 0x1f64c, - 0x1f64f, 0x1f680, 0x1f683, 0x1f684, - 0x1f685, 0x1f687, 0x1f689, 0x1f68c, - 0x1f68f, 0x1f691, 0x1f692, 0x1f693, - 0x1f695, 0x1f697, 0x1f699, 0x1f69a, - 0x1f6a2, 0x1f6a4, 0x1f6a5, 0x1f6a7, - 0x1f6ac, 0x1f6ad, 0x1f6b2, 0x1f6b6, - 0x1f6b9, 0x1f6ba, 0x1f6bb, 0x1f6bc, - 0x1f6bd, 0x1f6be, 0x1f6c0, }; +static const int mb_tbl_uni_sb2code3_min = 0x1f004; +static const int mb_tbl_uni_sb2code3_max = 0x1f6c0; -const int mb_tbl_uni_sb2code3_value[] = { // 0x1f004 - 0x1f6c0 +static const unsigned short mb_tbl_uni_sb2code3_key[] = { // 0x1f004 - 0x1f6c0 + 0xf004, 0xf170, 0xf171, 0xf17e, + 0xf17f, 0xf18e, 0xf192, 0xf194, + 0xf195, 0xf197, 0xf199, 0xf19a, + 0xf1e8, 0xf1e9, 0xf1ea, 0xf1eb, + 0xf1ec, 0xf1ee, 0xf1ef, 0xf1f0, + 0xf1f7, 0xf1fa, 0xf201, 0xf202, + 0xf21a, 0xf22f, 0xf233, 0xf235, + 0xf236, 0xf237, 0xf238, 0xf239, + 0xf23a, 0xf250, 0xf300, 0xf302, + 0xf303, 0xf304, 0xf305, 0xf306, + 0xf307, 0xf308, 0xf30a, 0xf319, + 0xf31f, 0xf334, 0xf335, 0xf337, + 0xf338, 0xf339, 0xf33a, 0xf33b, + 0xf33e, 0xf340, 0xf341, 0xf342, + 0xf343, 0xf345, 0xf346, 0xf349, + 0xf34a, 0xf34e, 0xf353, 0xf354, + 0xf358, 0xf359, 0xf35a, 0xf35b, + 0xf35c, 0xf35d, 0xf35e, 0xf35f, + 0xf361, 0xf362, 0xf363, 0xf366, + 0xf367, 0xf370, 0xf371, 0xf372, + 0xf373, 0xf374, 0xf375, 0xf376, + 0xf378, 0xf37a, 0xf37b, 0xf380, + 0xf381, 0xf382, 0xf383, 0xf384, + 0xf385, 0xf386, 0xf387, 0xf388, + 0xf389, 0xf38c, 0xf38d, 0xf38e, + 0xf38f, 0xf390, 0xf391, 0xf392, + 0xf393, 0xf3a1, 0xf3a2, 0xf3a4, + 0xf3a5, 0xf3a6, 0xf3a7, 0xf3a8, + 0xf3a9, 0xf3ab, 0xf3ac, 0xf3af, + 0xf3b0, 0xf3b1, 0xf3b5, 0xf3b6, + 0xf3b7, 0xf3b8, 0xf3ba, 0xf3be, + 0xf3bf, 0xf3c0, 0xf3c1, 0xf3c3, + 0xf3c4, 0xf3c6, 0xf3c8, 0xf3ca, + 0xf3e0, 0xf3e2, 0xf3e3, 0xf3e5, + 0xf3e6, 0xf3e7, 0xf3e8, 0xf3e9, + 0xf3ea, 0xf3eb, 0xf3ec, 0xf3ed, + 0xf3ef, 0xf3f0, 0xf40d, 0xf40e, + 0xf411, 0xf412, 0xf414, 0xf417, + 0xf418, 0xf419, 0xf41a, 0xf41b, + 0xf41f, 0xf420, 0xf424, 0xf426, + 0xf427, 0xf428, 0xf42b, 0xf42c, + 0xf42d, 0xf42e, 0xf42f, 0xf430, + 0xf431, 0xf433, 0xf434, 0xf435, + 0xf436, 0xf437, 0xf438, 0xf439, + 0xf43a, 0xf43b, 0xf440, 0xf442, + 0xf443, 0xf444, 0xf446, 0xf447, + 0xf448, 0xf449, 0xf44a, 0xf44b, + 0xf44c, 0xf44d, 0xf44e, 0xf44f, + 0xf450, 0xf451, 0xf452, 0xf454, + 0xf455, 0xf457, 0xf458, 0xf459, + 0xf45c, 0xf45f, 0xf460, 0xf461, + 0xf462, 0xf463, 0xf466, 0xf467, + 0xf468, 0xf469, 0xf46b, 0xf46e, + 0xf46f, 0xf471, 0xf472, 0xf473, + 0xf474, 0xf475, 0xf476, 0xf477, + 0xf478, 0xf47b, 0xf47c, 0xf47d, + 0xf47e, 0xf47f, 0xf480, 0xf481, + 0xf482, 0xf483, 0xf484, 0xf485, + 0xf486, 0xf487, 0xf488, 0xf489, + 0xf48a, 0xf48b, 0xf48d, 0xf48e, + 0xf48f, 0xf490, 0xf491, 0xf492, + 0xf493, 0xf494, 0xf497, 0xf498, + 0xf499, 0xf49a, 0xf49b, 0xf49c, + 0xf49d, 0xf49f, 0xf4a1, 0xf4a2, + 0xf4a3, 0xf4a4, 0xf4a6, 0xf4a8, + 0xf4a9, 0xf4aa, 0xf4b0, 0xf4b1, + 0xf4b9, 0xf4ba, 0xf4bb, 0xf4bc, + 0xf4bd, 0xf4bf, 0xf4c0, 0xf4d6, + 0xf4dd, 0xf4e0, 0xf4e1, 0xf4e2, + 0xf4e3, 0xf4e9, 0xf4eb, 0xf4ee, + 0xf4f1, 0xf4f2, 0xf4f3, 0xf4f4, + 0xf4f6, 0xf4f7, 0xf4fa, 0xf4fb, + 0xf4fc, 0xf50a, 0xf50d, 0xf511, + 0xf512, 0xf513, 0xf514, 0xf51d, + 0xf51e, 0xf525, 0xf528, 0xf52b, + 0xf52f, 0xf530, 0xf531, 0xf532, + 0xf533, 0xf534, 0xf550, 0xf551, + 0xf552, 0xf553, 0xf554, 0xf555, + 0xf556, 0xf557, 0xf558, 0xf559, + 0xf55a, 0xf55b, 0xf5fb, 0xf5fc, + 0xf5fd, 0xf601, 0xf602, 0xf603, + 0xf604, 0xf609, 0xf60a, 0xf60c, + 0xf60d, 0xf60f, 0xf612, 0xf613, + 0xf614, 0xf616, 0xf618, 0xf61a, + 0xf61c, 0xf61d, 0xf61e, 0xf620, + 0xf621, 0xf622, 0xf623, 0xf625, + 0xf628, 0xf62a, 0xf62d, 0xf630, + 0xf631, 0xf632, 0xf633, 0xf637, + 0xf645, 0xf646, 0xf647, 0xf64c, + 0xf64f, 0xf680, 0xf683, 0xf684, + 0xf685, 0xf687, 0xf689, 0xf68c, + 0xf68f, 0xf691, 0xf692, 0xf693, + 0xf695, 0xf697, 0xf699, 0xf69a, + 0xf6a2, 0xf6a4, 0xf6a5, 0xf6a7, + 0xf6ac, 0xf6ad, 0xf6b2, 0xf6b6, + 0xf6b9, 0xf6ba, 0xf6bb, 0xf6bc, + 0xf6bd, 0xf6be, 0xf6c0, }; + +static const unsigned short mb_tbl_uni_sb2code3_value[] = { // 0x1f004 - 0x1f6c0 0x27d5, 0x2b29, 0x2b2a, 0x2b2c, 0x27f7, 0x2b2b, 0x281b, 0x2830, 0x2819, 0x2854, 0x281a, 0x27d6, @@ -1153,3 +1155,73 @@ const int mb_tbl_uni_sb2code3_value[] = { // 0x1f004 - 0x1f6c0 0x298d, 0x280f, 0x27de, 0x2808, 0x27e0, 0x27e1, 0x27f9, 0x27e2, 0x27e8, 0x2988, 0x27e7, }; + +static const int mb_tbl_uni_sb2code3_len = sizeof(mb_tbl_uni_sb2code3_key)/sizeof(unsigned short); + +/* unsupported in Unicode 6.0 */ + +static const int mb_tbl_uni_docomo2code5_min = 0xfe82d; +static const int mb_tbl_uni_docomo2code5_max = 0xfee33; + +static const unsigned short mb_tbl_uni_docomo2code5_key[] = { // 0xfe82d - 0xfee33 + 0xE82D, 0xEE10, 0xEE11, 0xEE12, + 0xEE13, 0xEE14, 0xEE15, 0xEE16, + 0xEE17, 0xEE18, 0xEE19, 0xEE1A, + 0xEE1B, 0xEE1C, 0xEE1D, 0xEE1E, + 0xEE1F, 0xEE20, 0xEE21, 0xEE22, + 0xEE23, 0xEE24, 0xEE25, 0xEE26, + 0xEE27, 0xEE28, 0xEE29, 0xEE2A, + 0xEE2B, 0xEE2C, 0xEE2D, 0xEE2E, + 0xEE2F, 0xEE30, 0xEE31, 0xEE32, + 0xEE33, }; + +static const unsigned short mb_tbl_uni_docomo2code5_val[] = { // 0xfe82d - 0xfee33 + 0x2965, 0x2955, 0x2956, 0x2958, + 0x2959, 0x2990, 0x2991, 0x292A, + 0x292B, 0x292C, 0x292D, 0x292E, + 0x292F, 0x2933, 0x2934, 0x2938, + 0x2939, 0x293A, 0x293F, 0x2940, + 0x2941, 0x2942, 0x2943, 0x2944, + 0x2945, 0x2946, 0x2947, 0x2948, + 0x2949, 0x294A, 0x294B, 0x294C, + 0x294D, 0x294E, 0x294F, 0x2950, + 0x2951, }; + +static const unsigned short mb_tbl_uni_docomo2code5_len = sizeof(mb_tbl_uni_docomo2code5_key)/sizeof(unsigned short); + + +static const int mb_tbl_uni_kddi2code5_min = 0xfe82d; +static const int mb_tbl_uni_kddi2code5_max = 0xfee4a; + +static const unsigned short mb_tbl_uni_kddi2code5_key[] = { // 0xfe82d - 0xfee4a + 0xE82D, 0xE83C, 0xEB89, 0xEE40, + 0xEE41, 0xEE42, 0xEE43, 0xEE44, + 0xEE45, 0xEE46, 0xEE47, 0xEE48, + 0xEE49, 0xEE4A, }; + +static const unsigned short mb_tbl_uni_kddi2code5_val[] = { // 0xfe82d - 0xfee4a + 0x27B0, 0x280A, 0x2839, 0x27FB, + 0x2836, 0x24E8, 0x25AC, 0x25B9, + 0x25C1, 0x25C2, 0x25C3, 0x25C4, + 0x25C5, 0x25C6, }; + +static const unsigned short mb_tbl_uni_kddi2code5_len = sizeof(mb_tbl_uni_kddi2code5_key)/sizeof(unsigned short); + + +static const int mb_tbl_uni_sb2code5_min = 0xfe4c5; +static const int mb_tbl_uni_sb2code5_max = 0xfee7d; + +static const unsigned short mb_tbl_uni_sb2code5_key[] = { // 0xfe4c5 - 0xfee7d + 0xE4C5, 0xEE70, 0xEE71, 0xEE72, + 0xEE73, 0xEE74, 0xEE75, 0xEE76, + 0xEE77, 0xEE78, 0xEE79, 0xEE7A, + 0xEE7B, 0xEE7C, 0xEE7D, }; + +static const unsigned short mb_tbl_uni_sb2code5_val[] = { // 0xfe4c5 - 0xfee7d + 0x2B01, 0x2B2F, 0x2B30, 0x2B31, + 0x2B32, 0x2B33, 0x2B34, 0x2B35, + 0x285B, 0x285C, 0x285D, 0x285E, + 0x285F, 0x2860, 0x2861, }; + +static const unsigned short mb_tbl_uni_sb2code5_len = sizeof(mb_tbl_uni_sb2code5_key)/sizeof(unsigned short); + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c index a93ee4e4bbd..a7daf2b913d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c @@ -38,7 +38,7 @@ #include "unicode_table_jis.h" #include "cp932_table.h" -static int mbfl_filt_ident_2022jpms(int c, mbfl_identify_filter *filter); +int mbfl_filt_ident_2022jpms(int c, mbfl_identify_filter *filter); static const char *mbfl_encoding_2022jpms_aliases[] = {"ISO2022JPMS", NULL}; @@ -433,7 +433,7 @@ mbfl_filt_conv_any_2022jpms_flush(mbfl_convert_filter *filter) return 0; } -static int mbfl_filt_ident_2022jpms(int c, mbfl_identify_filter *filter) +int mbfl_filt_ident_2022jpms(int c, mbfl_identify_filter *filter) { retry: switch (filter->status & 0xf) { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c new file mode 100644 index 00000000000..4c8d9747143 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -0,0 +1,431 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * The source code included in this files was separated from mbfilter_iso2022_jp_ms.c + * by Rui Hirokawa on 25 July 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_iso2022jp_mobile.h" +#include "mbfilter_sjis_mobile.h" + +#include "unicode_table_cp932_ext.h" +#include "unicode_table_jis.h" +#include "cp932_table.h" + +extern int mbfl_filt_conv_any_jis_flush(mbfl_convert_filter *filter); +extern int mbfl_filt_ident_2022jpms(int c, mbfl_identify_filter *filter); + +const mbfl_encoding mbfl_encoding_2022jp_kddi = { + mbfl_no_encoding_2022jp_kddi, + "ISO-2022-JP-MOBILE#KDDI", + "ISO-2022-JP", + NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE +}; + +const struct mbfl_identify_vtbl vtbl_identify_2022jp_kddi = { + mbfl_no_encoding_2022jp_kddi, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_2022jpms +}; + +const struct mbfl_convert_vtbl vtbl_2022jp_kddi_wchar = { + mbfl_no_encoding_2022jp_kddi, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_2022jp_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_2022jp_kddi = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_2022jp_kddi, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_2022jp_mobile, + mbfl_filt_conv_any_jis_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +#define sjistoidx(c1, c2) \ + (((c1) > 0x9f) \ + ? (((c1) - 0xc1) * 188 + (c2) - (((c2) > 0x7e) ? 0x41 : 0x40)) \ + : (((c1) - 0x81) * 188 + (c2) - (((c2) > 0x7e) ? 0x41 : 0x40))) +#define idxtojis1(c) (((c) / 94) + 0x21) +#define idxtojis2(c) (((c) % 94) + 0x21) + +#define SJIS_ENCODE(c1,c2,s1,s2) \ + do { \ + s1 = c1; \ + s1--; \ + s1 >>= 1; \ + if ((c1) < 0x5f) { \ + s1 += 0x71; \ + } else { \ + s1 += 0xb1; \ + } \ + s2 = c2; \ + if ((c1) & 1) { \ + if ((c2) < 0x60) { \ + s2--; \ + } \ + s2 += 0x20; \ + } else { \ + s2 += 0x7e; \ + } \ + } while (0) + +#define SJIS_DECODE(c1,c2,s1,s2) \ + do { \ + s1 = c1; \ + if (s1 < 0xa0) { \ + s1 -= 0x81; \ + } else { \ + s1 -= 0xc1; \ + } \ + s1 <<= 1; \ + s1 += 0x21; \ + s2 = c2; \ + if (s2 < 0x9f) { \ + if (s2 < 0x7f) { \ + s2++; \ + } \ + s2 -= 0x20; \ + } else { \ + s1++; \ + s2 -= 0x7e; \ + } \ + } while (0) + +#define CODE2JIS(c1,c2,s1,s2) \ + c1 = (s1)/94+0x21; \ + c2 = (s1)-94*((c1)-0x21)+0x21; \ + s1 = ((c1) << 8) | (c2); \ + s2 = 1 + +/* + * ISO-2022-JP-Mobile => wchar + */ +int +mbfl_filt_conv_2022jp_mobile_wchar(int c, mbfl_convert_filter *filter) +{ + int c1, c2, s, w, s1, s2, snd; + +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x10: X 0201 latin */ +/* case 0x20: X 0201 kana */ +/* case 0x80: X 0208 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (filter->status == 0x20 && c > 0x20 && c < 0x60) { /* kana */ + CK((*filter->output_function)(0xff40 + c, filter->data)); + } else if (filter->status == 0x80 && c > 0x20 && c < 0x80) { /* kanji first char */ + filter->cache = c; + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else if (c > 0xa0 && c < 0xe0) { /* GR kana */ + CK((*filter->output_function)(0xfec0 + c, filter->data)); + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + +/* case 0x81: X 0208 second char */ + case 1: + w = 0; + filter->status &= ~0xf; + c1 = filter->cache; + if (c > 0x20 && c < 0x7f) { + s = (c1 - 0x21)*94 + c - 0x21; + + if (s <= 137) { + if (s == 31) { + w = 0xff3c; /* FULLWIDTH REVERSE SOLIDUS */ + } else if (s == 32) { + w = 0xff5e; /* FULLWIDTH TILDE */ + } else if (s == 33) { + w = 0x2225; /* PARALLEL TO */ + } else if (s == 60) { + w = 0xff0d; /* FULLWIDTH HYPHEN-MINUS */ + } else if (s == 80) { + w = 0xffe0; /* FULLWIDTH CENT SIGN */ + } else if (s == 81) { + w = 0xffe1; /* FULLWIDTH POUND SIGN */ + } else if (s == 137) { + w = 0xffe2; /* FULLWIDTH NOT SIGN */ + } + } + + if (w == 0) { + if (s >= cp932ext1_ucs_table_min && s < cp932ext1_ucs_table_max) { /* vendor ext1 (13ku) */ + w = cp932ext1_ucs_table[s - cp932ext1_ucs_table_min]; + } else if (s >= 0 && s < jisx0208_ucs_table_size) { + w = jisx0208_ucs_table[s]; + } else { + w = 0; + } + } + + if (s >= (84*94) && s < 91*94) { + s += 22*94; + if (filter->from->no_encoding == mbfl_no_encoding_2022jp_kddi) { + w = mbfilter_sjis_emoji_kddi2unicode(s, &snd); + } + if (w > 0 && snd > 0) { + CK((*filter->output_function)(snd, filter->data)); + } + } + + if (w <= 0) { + w = (c1 << 8) | c; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0208; + } + CK((*filter->output_function)(w, filter->data)); + } else if (c == 0x1b) { + filter->status += 2; + } else if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else { + w = (c1 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + /* ESC */ +/* case 0x02: */ +/* case 0x12: */ +/* case 0x22: */ +/* case 0x82: */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + goto retry; + } + break; + + /* ESC $ */ +/* case 0x03: */ +/* case 0x13: */ +/* case 0x23: */ +/* case 0x83: */ + case 3: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else if (c == 0x28) { /* '(' */ + filter->status++; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x24, filter->data)); + goto retry; + } + break; + + /* ESC $ ( */ +/* case 0x04: */ +/* case 0x14: */ +/* case 0x24: */ +/* case 0x84: */ + case 4: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x24, filter->data)); + CK((*filter->output_function)(0x28, filter->data)); + goto retry; + } + break; + + /* ESC ( */ +/* case 0x05: */ +/* case 0x15: */ +/* case 0x25: */ +/* case 0x85: */ + case 5: + if (c == 0x42) { /* 'B' */ + filter->status = 0; + } else if (c == 0x4a) { /* 'J' */ + filter->status = 0; + } else if (c == 0x49) { /* 'I' */ + filter->status = 0x20; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x28, filter->data)); + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +/* + * wchar => ISO-2022-JP-Mobile + */ +int +mbfl_filt_conv_wchar_2022jp_mobile(int c, mbfl_convert_filter *filter) +{ + int c1, c2, s1, s2; + + s1 = 0; + s2 = 0; + if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { + s1 = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { + s1 = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; + } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { + s1 = ucs_i_jis_table[c - ucs_i_jis_table_min]; + } else if (c >= ucs_r_jis_table_min && c < ucs_r_jis_table_max) { + s1 = ucs_r_jis_table[c - ucs_r_jis_table_min]; + } else if (c >= 0xe000 && c < (0xe000 + 20*94)) { /* user (95ku - 114ku) */ + s1 = c - 0xe000; + c1 = s1/94 + 0x7f; + c2 = s1%94 + 0x21; + s1 = (c1 << 8) | c2; + } + if (s1 <= 0) { + c1 = c & ~MBFL_WCSPLANE_MASK; + if (c1 == MBFL_WCSPLANE_WINCP932) { + s1 = c & MBFL_WCSPLANE_MASK; + s2 = 1; + } else if (c1 == MBFL_WCSPLANE_JIS0208) { + s1 = c & MBFL_WCSPLANE_MASK; + } else if (c1 == MBFL_WCSPLANE_JIS0212) { + s1 = c & MBFL_WCSPLANE_MASK; + s1 |= 0x8080; + } else if (c == 0xa5) { /* YEN SIGN */ + s1 = 0x216f; /* FULLWIDTH YEN SIGN */ + } else if (c == 0x203e) { /* OVER LINE */ + s1 = 0x2131; /* FULLWIDTH MACRON */ + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s1 = 0x2140; + } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ + s1 = 0x2141; + } else if (c == 0x2225) { /* PARALLEL TO */ + s1 = 0x2142; + } else if (c == 0xff0d) { /* FULLWIDTH HYPHEN-MINUS */ + s1 = 0x215d; + } else if (c == 0xffe0) { /* FULLWIDTH CENT SIGN */ + s1 = 0x2171; + } else if (c == 0xffe1) { /* FULLWIDTH POUND SIGN */ + s1 = 0x2172; + } else if (c == 0xffe2) { /* FULLWIDTH NOT SIGN */ + s1 = 0x224c; + } + } + + if ((s1 <= 0) || (s1 >= 0xa1a1 && s2 == 0)) { /* not found or X 0212 */ + s1 = -1; + c1 = 0; + c2 = cp932ext1_ucs_table_max - cp932ext1_ucs_table_min; + while (c1 < c2) { /* CP932 vendor ext1 (13ku) */ + if (c == cp932ext1_ucs_table[c1]) { + s1 = ((c1/94 + 0x2d) << 8) + (c1%94 + 0x21); + break; + } + c1++; + } + if (c == 0) { + s1 = 0; + } else if (s1 <= 0) { + s1 = -1; + } + } + + if (filter->to->no_encoding == mbfl_no_encoding_2022jp_kddi && + mbfilter_unicode2sjis_emoji_kddi(c, &s1, filter) > 0) { + CODE2JIS(c1,c2,s1,s2); + s1 -= 0x1600; + } + + if (filter->status == 1 && filter->cache > 0) { + return c; + } + + if (s1 >= 0) { + if (s1 < 0x80) { /* latin */ + if ((filter->status & 0xff00) != 0) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + } + CK((*filter->output_function)(s1, filter->data)); + filter->status = 0; + } else if (s1 > 0xa0 && s1 < 0xe0) { /* kana */ + if ((filter->status & 0xff00) != 0x100) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x49, filter->data)); /* 'I' */ + } + filter->status = 0x100; + CK((*filter->output_function)(s1 & 0x7f, filter->data)); + } else if (s1 < 0x7e7f) { /* X 0208 */ + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + } + filter->status = 0x200; + CK((*filter->output_function)((s1 >> 8) & 0xff, filter->data)); + CK((*filter->output_function)(s1 & 0x7f, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.h b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.h new file mode 100644 index 00000000000..7ae1da2ddc1 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.h @@ -0,0 +1,43 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * The source code included in this files was separated from mbfilter_iso2022_jp_ms.h + * by Rui Hirokawa on 25 July 2011. + * + */ + +#ifndef MBFL_MBFILTER_ISO2022_JP_MOBILE_H +#define MBFL_MBFILTER_ISO2022_JP_MOBILE_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_2022jp_kddi; +extern const struct mbfl_identify_vtbl vtbl_identify_2022jp_kddi; +extern const struct mbfl_convert_vtbl vtbl_2022jp_kddi_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_2022jp_kddi; + +int mbfl_filt_conv_2022jp_mobile_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_2022jp_mobile(int c, mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_ISO2022_JP_MOBILE_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index 7bce1854548..37ea55e4b8e 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -40,6 +40,7 @@ #include "emoji2uni.h" +extern int mbfl_bisec_srch2(int w, const unsigned short tbl[], int n); extern int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter); extern const unsigned char mblen_table_sjis[]; @@ -149,14 +150,14 @@ static const char nflags_s[10][2] = {"CN","DE","ES","FR","GB","IT","JP","KR","RU static const int nflags_code_kddi[10] = {0x2549, 0x2546, 0x24c0, 0x2545, 0x2548, 0x2547, 0x2750, 0x254a, 0x24c1, 0x27f7}; static const int nflags_code_sb[10] = {0x2b0a, 0x2b05, 0x2b08, 0x2b04, 0x2b07, 0x2b06, 0x2b02, 0x2b0b, 0x2b09, 0x2b03}; -const int mbfl_docomo2uni_pua[4][3] = { +const unsigned short mbfl_docomo2uni_pua[4][3] = { {0x28c2, 0x2929, 0xe63e}, {0x2930, 0x2932, 0xe6ac}, {0x2935, 0x293e, 0xe6b1}, {0x2952, 0x29db, 0xe6ce}, }; -const int mbfl_kddi2uni_pua[6][3] = { +const unsigned short mbfl_kddi2uni_pua[6][3] = { {0x26ec, 0x2838, 0xe468}, {0x284c, 0x2863, 0xe5b5}, {0x24b8, 0x24ca, 0xe5cd}, @@ -165,7 +166,7 @@ const int mbfl_kddi2uni_pua[6][3] = { {0x2546, 0x25c0, 0xeb0e}, }; -const int mbfl_sb2uni_pua[6][3] = { +const unsigned short mbfl_sb2uni_pua[6][3] = { {0x27a9, 0x2802, 0xe101}, {0x2808, 0x285a, 0xe201}, {0x2921, 0x297a, 0xe001}, @@ -174,7 +175,7 @@ const int mbfl_sb2uni_pua[6][3] = { {0x2af8, 0x2b2e, 0xe501}, }; -const int mbfl_kddi2uni_pua_b[8][3] = { +const unsigned short mbfl_kddi2uni_pua_b[8][3] = { {0x24b8, 0x24f6, 0xec40}, {0x24f7, 0x2573, 0xec80}, {0x2574, 0x25b2, 0xed40}, @@ -239,7 +240,7 @@ const int mbfl_kddi2uni_pua_b[8][3] = { s2 = 1 int -mbfilter_conv_map_tbl(int c, int *w, const int map[][3], int n) +mbfilter_conv_map_tbl(int c, int *w, const unsigned short map[][3], int n) { int i, match = 0; @@ -254,7 +255,7 @@ mbfilter_conv_map_tbl(int c, int *w, const int map[][3], int n) } int -mbfilter_conv_r_map_tbl(int c, int *w, const int map[][3], int n) +mbfilter_conv_r_map_tbl(int c, int *w, const unsigned short map[][3], int n) { int i, match = 0; @@ -268,21 +269,6 @@ mbfilter_conv_r_map_tbl(int c, int *w, const int map[][3], int n) return match; } -int -mbfilter_conv_seq_tbl(int c, int *w, const int *key, const int *val, int n) -{ - int i, match = 0; - for (i = 0; i< n; i++) { - if (c == key[i]) { - *w = val[i]; - match = 1; - break; - } - } - return match; -} - - int mbfilter_sjis_emoji_docomo2unicode(int s, int *snd) { @@ -293,14 +279,23 @@ mbfilter_sjis_emoji_docomo2unicode(int s, int *snd) s != mb_tbl_code2uni_docomo1_min + 0x00a3) { w = 0x20E3; *snd = mb_tbl_code2uni_docomo1[s - mb_tbl_code2uni_docomo1_min]; + if (*snd > 0xf000) { + *snd += 0x10000; + } } else { w = mb_tbl_code2uni_docomo1[s - mb_tbl_code2uni_docomo1_min]; + if (w > 0xf000) { + w += 0x10000; + } else if (w > 0xe000) { /* unsuported by Unicode 6.0 */ + w += 0xf0000; + } *snd = 0; if (!w) { w = s; } } } + return w; } @@ -324,6 +319,11 @@ mbfilter_sjis_emoji_kddi2unicode(int s, int *snd) *snd = 0x0023; w = 0x20E3; } else { w = mb_tbl_code2uni_kddi1[si]; + if (w > 0xf000) { + w += 0x10000; + } else if (w > 0xe000) { /* unsuported by Unicode 6.0 */ + w += 0xf0000; + } } } else if (s >= mb_tbl_code2uni_kddi2_min && s <= mb_tbl_code2uni_kddi2_max) { si = s - mb_tbl_code2uni_kddi2_min; @@ -337,6 +337,11 @@ mbfilter_sjis_emoji_kddi2unicode(int s, int *snd) *snd = 0x0030; w = 0x20E3; } else { w = mb_tbl_code2uni_kddi2[si]; + if (w > 0xf000) { + w += 0x10000; + } else if (w > 0xe000) { /* unsuported by Unicode 6.0 */ + w += 0xf0000; + } } } return w; @@ -353,13 +358,26 @@ mbfilter_sjis_emoji_sb2unicode(int s, int *snd) si = s - mb_tbl_code2uni_sb1_min; if (si == 0x006e || (si >= 0x007a && si <= 0x0083)) { *snd = mb_tbl_code2uni_sb1[si]; + if (*snd > 0xf000) { + *snd += 0x10000; + } w = 0x20E3; } else { w = mb_tbl_code2uni_sb1[si]; + if (w > 0xf000) { + w += 0x10000; + } else if (w > 0xe000) { /* unsuported by Unicode 6.0 */ + w += 0xf0000; + } } } else if (s >= mb_tbl_code2uni_sb2_min && s <= mb_tbl_code2uni_sb2_max) { si = s - mb_tbl_code2uni_sb2_min; w = mb_tbl_code2uni_sb2[si]; + if (w > 0xf000) { + w += 0x10000; + } else if (w > 0xe000) { /* unsuported by Unicode 6.0 */ + w += 0xf0000; + } } else if (s >= mb_tbl_code2uni_sb3_min && s <= mb_tbl_code2uni_sb3_max) { si = s - mb_tbl_code2uni_sb3_min; if (si >= 0x0069 && si <= 0x0072) { @@ -367,6 +385,11 @@ mbfilter_sjis_emoji_sb2unicode(int s, int *snd) *snd = NFLAGS(nflags_s[c][0]); w = NFLAGS(nflags_s[c][1]); } else { w = mb_tbl_code2uni_sb3[si]; + if (w > 0xf000) { + w += 0x10000; + } else if (w > 0xe000) { /* unsuported by Unicode 6.0 */ + w += 0xf0000; + } } } return w; @@ -408,11 +431,23 @@ mbfilter_unicode2sjis_emoji_docomo(int c, int *s1, mbfl_convert_filter *filter) } else if (c == 0x00AE) { *s1 = 0x29ba; match = 1; } else if (c >= mb_tbl_uni_docomo2code2_min && c <= mb_tbl_uni_docomo2code2_max) { - match = mbfilter_conv_seq_tbl(c, s1, mb_tbl_uni_docomo2code2_key, mb_tbl_uni_docomo2code2_value, - sizeof(mb_tbl_uni_docomo2code2_key)/sizeof(int)); + i = mbfl_bisec_srch2(c, mb_tbl_uni_docomo2code2_key, mb_tbl_uni_docomo2code2_len); + if (i >= 0) { + *s1 = mb_tbl_uni_docomo2code2_value[i]; + match = 1; + } } else if (c >= mb_tbl_uni_docomo2code3_min && c <= mb_tbl_uni_docomo2code3_max) { - match = mbfilter_conv_seq_tbl(c, s1, mb_tbl_uni_docomo2code3_key, mb_tbl_uni_docomo2code3_value, - sizeof(mb_tbl_uni_docomo2code3_key)/sizeof(int)); + i = mbfl_bisec_srch2(c - 0x10000, mb_tbl_uni_docomo2code3_key, mb_tbl_uni_docomo2code3_len); + if (i >= 0) { + *s1 = mb_tbl_uni_docomo2code3_value[i]; + match = 1; + } + } else if (c >= mb_tbl_uni_docomo2code5_min && c <= mb_tbl_uni_docomo2code5_max) { + i = mbfl_bisec_srch2(c - 0xf0000, mb_tbl_uni_docomo2code5_key, mb_tbl_uni_docomo2code5_len); + if (i >= 0) { + *s1 = mb_tbl_uni_docomo2code5_val[i]; + match = 1; + } } } @@ -467,12 +502,24 @@ mbfilter_unicode2sjis_emoji_kddi(int c, int *s1, mbfl_convert_filter *filter) } else if (c == 0x00AE) { *s1 = 0x27dd; match = 1; } else if (c >= mb_tbl_uni_kddi2code2_min && c <= mb_tbl_uni_kddi2code2_max) { - match = mbfilter_conv_seq_tbl(c, s1, mb_tbl_uni_kddi2code2_key, mb_tbl_uni_kddi2code2_value, - sizeof(mb_tbl_uni_kddi2code2_key)/sizeof(int)); + i = mbfl_bisec_srch2(c, mb_tbl_uni_kddi2code2_key, mb_tbl_uni_kddi2code2_len); + if (i >= 0) { + *s1 = mb_tbl_uni_kddi2code2_value[i]; + match = 1; + } } else if (c >= mb_tbl_uni_kddi2code3_min && c <= mb_tbl_uni_kddi2code3_max) { - match = mbfilter_conv_seq_tbl(c, s1, mb_tbl_uni_kddi2code3_key, mb_tbl_uni_kddi2code3_value, - sizeof(mb_tbl_uni_kddi2code3_key)/sizeof(int)); - } + i = mbfl_bisec_srch2(c - 0x10000, mb_tbl_uni_kddi2code3_key, mb_tbl_uni_kddi2code3_len); + if (i >= 0) { + *s1 = mb_tbl_uni_kddi2code3_value[i]; + match = 1; + } + } else if (c >= mb_tbl_uni_kddi2code5_min && c <= mb_tbl_uni_kddi2code5_max) { + i = mbfl_bisec_srch2(c - 0xf0000, mb_tbl_uni_kddi2code5_key, mb_tbl_uni_kddi2code5_len); + if (i >= 0) { + *s1 = mb_tbl_uni_kddi2code5_val[i]; + match = 1; + } + } } return match; @@ -525,14 +572,25 @@ mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter) } else if (c == 0x00AE) { *s1 = 0x2856; match = 1; } else if (c >= mb_tbl_uni_sb2code2_min && c <= mb_tbl_uni_sb2code2_max) { - match = mbfilter_conv_seq_tbl(c, s1, mb_tbl_uni_sb2code2_key, mb_tbl_uni_sb2code2_value, - sizeof(mb_tbl_uni_sb2code2_key)/sizeof(int)); + i = mbfl_bisec_srch2(c, mb_tbl_uni_sb2code2_key, mb_tbl_uni_sb2code2_len); + if (i >= 0) { + *s1 = mb_tbl_uni_sb2code2_value[i]; + match = 1; + } } else if (c >= mb_tbl_uni_sb2code3_min && c <= mb_tbl_uni_sb2code3_max) { - match = mbfilter_conv_seq_tbl(c, s1, mb_tbl_uni_sb2code3_key, mb_tbl_uni_sb2code3_value, - sizeof(mb_tbl_uni_sb2code3_key)/sizeof(int)); - } + i = mbfl_bisec_srch2(c - 0x10000, mb_tbl_uni_sb2code3_key, mb_tbl_uni_sb2code3_len); + if (i >= 0) { + *s1 = mb_tbl_uni_sb2code3_value[i]; + match = 1; + } + } else if (c >= mb_tbl_uni_sb2code5_min && c <= mb_tbl_uni_sb2code5_max) { + i = mbfl_bisec_srch2(c - 0xf0000, mb_tbl_uni_sb2code5_key, mb_tbl_uni_sb2code5_len); + if (i >= 0) { + *s1 = mb_tbl_uni_sb2code5_val[i]; + match = 1; + } + } } - return match; } @@ -545,6 +603,7 @@ mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter) int c1, s, s1, s2, w; int snd = 0; +retry: switch (filter->status) { case 0: if (c >= 0 && c < 0x80) { /* latin */ @@ -632,34 +691,37 @@ mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter) CK((*filter->output_function)(w, filter->data)); } break; + /* ESC : Softbank Emoji */ case 2: if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb && c == 0x24) { filter->cache = c; - filter->status = 3; + filter->status++; } else { filter->cache = 0; filter->status = 0; CK((*filter->output_function)(0x1b, filter->data)); + goto retry; } break; + /* ESC $ : Softbank Emoji */ case 3: - /* Softbank Emoji: ESC $ [GEFOPQ] X 0x0f */ if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb && ((c >= 0x45 && c <= 0x47) || (c >= 0x4f && c <= 0x51))) { filter->cache = c; - filter->status = 4; + filter->status++; } else { filter->cache = 0; filter->status = 0; CK((*filter->output_function)(0x1b, filter->data)); CK((*filter->output_function)(0x24, filter->data)); + goto retry; } break; + /* ESC [GEFOPQ] : Softbank Emoji */ case 4: - /* Softbank Emoji Web code: ESC $ [GEFOPQ] X 0x0f */ w = 0; if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb) { c1 = filter->cache; @@ -684,10 +746,10 @@ mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter) } s = (s1 - 0x21)*94 + s2 - 0x21; w = mbfilter_sjis_emoji_sb2unicode(s, &snd); - if (w > 0 && snd > 0) { - CK((*filter->output_function)(snd, filter->data)); - } if (w > 0) { + if (snd > 0) { + CK((*filter->output_function)(snd, filter->data)); + } CK((*filter->output_function)(w, filter->data)); } } @@ -697,12 +759,10 @@ mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter) c1 = filter->cache; filter->cache = 0; filter->status = 0; - w = c & MBFL_WCSGROUP_MASK; - w |= MBFL_WCSGROUP_THROUGH; CK((*filter->output_function)(0x1b, filter->data)); CK((*filter->output_function)(0x24, filter->data)); CK((*filter->output_function)(c1 & 0xff, filter->data)); - CK((*filter->output_function)(w, filter->data)); + goto retry; } break; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h index 9de8988c228..b230de528c5 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h @@ -59,7 +59,7 @@ int mbfilter_unicode2sjis_emoji_docomo(int c, int *s1, mbfl_convert_filter *filt int mbfilter_unicode2sjis_emoji_kddi(int c, int *s1, mbfl_convert_filter *filter); int mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter); -int mbfilter_conv_map_tbl(int c, int *w, const int map[][3], int n); -int mbfilter_conv_r_map_tbl(int c, int *w, const int map[][3], int n); +int mbfilter_conv_map_tbl(int c, int *w, const unsigned short map[][3], int n); +int mbfilter_conv_r_map_tbl(int c, int *w, const unsigned short map[][3], int n); #endif /* MBFL_MBFILTER_SJIS_MOBILE_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index f9238ceb379..36c488af7ab 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -59,6 +59,7 @@ #include "filters/mbfilter_jis.h" #include "filters/mbfilter_iso2022_jp_ms.h" #include "filters/mbfilter_iso2022jp_2004.h" +#include "filters/mbfilter_iso2022jp_mobile.h" #include "filters/mbfilter_euc_jp.h" #include "filters/mbfilter_euc_jp_2004.h" #include "filters/mbfilter_euc_jp_win.h" @@ -132,6 +133,8 @@ const struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = { &vtbl_wchar_2022jpms, &vtbl_2022jp_2004_wchar, &vtbl_wchar_2022jp_2004, + &vtbl_2022jp_kddi_wchar, + &vtbl_wchar_2022jp_kddi, &vtbl_eucjpwin_wchar, &vtbl_wchar_eucjpwin, &vtbl_eucjp2004_wchar, diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c index 31151d70ee4..df63e8ae196 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c @@ -65,6 +65,7 @@ #include "filters/mbfilter_jis.h" #include "filters/mbfilter_iso2022_jp_ms.h" #include "filters/mbfilter_iso2022jp_2004.h" +#include "filters/mbfilter_iso2022jp_mobile.h" #include "filters/mbfilter_euc_jp.h" #include "filters/mbfilter_euc_jp_win.h" #include "filters/mbfilter_euc_jp_2004.h" @@ -212,6 +213,7 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_cp850, &mbfl_encoding_jis_ms, &mbfl_encoding_2022jp_2004, + &mbfl_encoding_2022jp_kddi, &mbfl_encoding_cp50220, &mbfl_encoding_cp50220raw, &mbfl_encoding_cp50221, diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index 625dd0ae2dd..8cb752d4225 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -84,6 +84,7 @@ enum mbfl_no_encoding { mbfl_no_encoding_jis, mbfl_no_encoding_2022jp, mbfl_no_encoding_2022jp_2004, + mbfl_no_encoding_2022jp_kddi, mbfl_no_encoding_2022jpms, mbfl_no_encoding_gb18030, mbfl_no_encoding_cp1252, diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c index 23c26190196..e2594d56676 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c @@ -55,6 +55,7 @@ #include "filters/mbfilter_jis.h" #include "filters/mbfilter_iso2022_jp_ms.h" #include "filters/mbfilter_iso2022jp_2004.h" +#include "filters/mbfilter_iso2022jp_mobile.h" #include "filters/mbfilter_euc_jp.h" #include "filters/mbfilter_euc_jp_win.h" #include "filters/mbfilter_euc_jp_2004.h" @@ -122,6 +123,7 @@ static const struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = { &vtbl_identify_2022jp, &vtbl_identify_2022jpms, &vtbl_identify_2022jp_2004, + &vtbl_identify_2022jp_kddi, &vtbl_identify_cp51932, &vtbl_identify_sjis_docomo, &vtbl_identify_sjis_kddi,