diff options
Diffstat (limited to 'ext/mbstring')
89 files changed, 14183 insertions, 1418 deletions
diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index a28af46629..5d70d45b80 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -235,14 +235,18 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_cp866.c libmbfl/filters/mbfilter_cp932.c libmbfl/filters/mbfilter_cp936.c + libmbfl/filters/mbfilter_gb18030.c libmbfl/filters/mbfilter_euc_cn.c libmbfl/filters/mbfilter_euc_jp.c + libmbfl/filters/mbfilter_euc_jp_2004.c libmbfl/filters/mbfilter_euc_jp_win.c libmbfl/filters/mbfilter_euc_kr.c libmbfl/filters/mbfilter_euc_tw.c libmbfl/filters/mbfilter_htmlent.c 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 @@ -264,6 +268,9 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_qprint.c libmbfl/filters/mbfilter_sjis.c libmbfl/filters/mbfilter_sjis_open.c + libmbfl/filters/mbfilter_sjis_mobile.c + libmbfl/filters/mbfilter_sjis_mac.c + libmbfl/filters/mbfilter_sjis_2004.c libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c libmbfl/filters/mbfilter_ucs2.c libmbfl/filters/mbfilter_ucs4.c @@ -273,6 +280,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_utf7.c libmbfl/filters/mbfilter_utf7imap.c libmbfl/filters/mbfilter_utf8.c + libmbfl/filters/mbfilter_utf8_mobile.c libmbfl/filters/mbfilter_uuencode.c libmbfl/filters/mbfilter_koi8u.c libmbfl/mbfl/mbfilter.c diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32 index ae0972f62a..7bc9518cb8 100644 --- a/ext/mbstring/config.w32 +++ b/ext/mbstring/config.w32 @@ -29,13 +29,15 @@ if (PHP_MBSTRING != "no") { mbfilter_iso8859_2.c mbfilter_iso8859_3.c mbfilter_iso8859_4.c \ mbfilter_iso8859_5.c mbfilter_iso8859_6.c mbfilter_iso8859_7.c \ mbfilter_iso8859_8.c mbfilter_iso8859_9.c mbfilter_jis.c \ - mbfilter_iso2022_jp_ms.c \ + mbfilter_iso2022_jp_ms.c mbfilter_gb18030.c mbfilter_sjis_2004.c \ mbfilter_koi8r.c mbfilter_qprint.c mbfilter_sjis.c mbfilter_ucs2.c \ mbfilter_ucs4.c mbfilter_uhc.c mbfilter_utf16.c mbfilter_utf32.c \ - mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_utf8.c \ - mbfilter_koi8u.c mbfilter_cp1254.c \ + 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_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/NEWS b/ext/mbstring/libmbfl/NEWS new file mode 100644 index 0000000000..fc16367ed1 --- /dev/null +++ b/ext/mbstring/libmbfl/NEWS @@ -0,0 +1,30 @@ + +version 1.3.2 August 20, 2011 + +- added JISX-0213:2004 based encoding : Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004 (rui). +- added gb18030 encoding (rui). +- added CP950 with user user defined area based on Big5 (rui). +- added mapping for user defined character area to CP936 (rui). +- added UTF-8-Mobile to support the pictogram characters defined by mobile phone carrier in Japan (rui). + +version 1.3.1 August 5, 2011 + +- added check for invalid/obsolete utf-8 encoding (rui). + +version 1.3.0 August 1, 2011 + +- added encoding conversion between Shift_JIS and Unicode (6.0 or PUA) + for pictogram characters defined by mobile phone carrier in Japan (rui). + + Detailed info:https://github.com/hirokawa/libmbfl/wiki/Introduction-to-libmbflhttps:--github.com-hirokawa-libmbfl-wiki-Introduction-to-libmbfl-_edit%23 + +- fixed encoding conversion of cp5022x for user defined area (rui). +- added MacJapanese (SJIS-mac) for legacy encoding support (rui). +- backport from PHP 5.2 (rui). + +version 1.1.0 March 02, 2010 + +- added cp5022x encoding (moriyoshi) +- added ISO-2022-JP-MS (moriyoshi) +- moved to github.com from sourceforge.jp (moriyoshi) + diff --git a/ext/mbstring/libmbfl/filters/Makefile.am b/ext/mbstring/libmbfl/filters/Makefile.am index 99df73b8dc..33f9049ae9 100644 --- a/ext/mbstring/libmbfl/filters/Makefile.am +++ b/ext/mbstring/libmbfl/filters/Makefile.am @@ -1,6 +1,7 @@ -EXTRA_DIST=mk_sb_tbl.awk +EXTRA_DIST=Makefile.bcc32 mk_sb_tbl.awk noinst_LTLIBRARIES=libmbfl_filters.la INCLUDES=-I../mbfl +PERL=perl libmbfl_filters_la_LDFLAGS=-version-info $(SHLIB_VERSION) libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_hz.c \ @@ -32,7 +33,10 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_uuencode.c \ mbfilter_base64.c \ mbfilter_sjis.c \ + mbfilter_sjis_2004.c \ mbfilter_sjis_open.c \ + mbfilter_sjis_mobile.c \ + mbfilter_sjis_mac.c \ mbfilter_7bit.c \ mbfilter_qprint.c \ mbfilter_ucs4.c \ @@ -40,15 +44,20 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_utf32.c \ mbfilter_utf16.c \ mbfilter_utf8.c \ + mbfilter_utf8_mobile.c \ mbfilter_utf7.c \ mbfilter_utf7imap.c \ mbfilter_euc_jp_win.c \ + mbfilter_euc_jp_2004.c \ mbfilter_cp932.c \ mbfilter_cp51932.c \ mbfilter_euc_cn.c \ mbfilter_euc_kr.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 \ mbfilter_koi8r.c \ @@ -72,14 +81,18 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_cp866.h \ mbfilter_cp932.h \ mbfilter_cp936.h \ + mbfilter_gb18030.h \ mbfilter_euc_cn.h \ mbfilter_euc_jp.h \ + mbfilter_euc_jp_2004.h \ mbfilter_euc_jp_win.h \ mbfilter_euc_kr.h \ mbfilter_euc_tw.h \ mbfilter_htmlent.h \ 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 \ @@ -102,6 +115,8 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_qprint.h \ mbfilter_sjis.h \ mbfilter_sjis_open.h \ + mbfilter_sjis_mobile.h \ + mbfilter_sjis_mac.h \ mbfilter_ucs2.h \ mbfilter_ucs4.h \ mbfilter_uhc.h \ @@ -110,6 +125,7 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_utf7.h \ mbfilter_utf7imap.h \ mbfilter_utf8.h \ + mbfilter_utf8_mobile.h \ mbfilter_uuencode.h \ mbfilter_cp5022x.h \ mbfilter_cp51932.h \ @@ -143,7 +159,9 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ unicode_table_armscii8.h \ unicode_table_cp850.h \ unicode_table_uhc.h \ - translit_kana_jisx0201_jisx0208.h + unicode_table_gb18030.h \ + translit_kana_jisx0201_jisx0208.h \ + emoji2uni.h mbfilter_iso8859_2.c: unicode_table_iso8859_2.h @@ -238,8 +256,14 @@ unicode_table_iso8859_16.h: mk_sb_tbl.awk $(AWK) -v TABLE_NAME=iso8859_16_ucs_table \ -v IFNDEF_NAME=UNICODE_TABLEISO8859_16_H -f mk_sb_tbl.awk 8859-16.TXT > $@ +EmojiSources.txt : + $(FETCH_VIA_FTP) ftp://ftp.unicode.org/Public/UNIDATA/$@ + +emoji2uni.h : mk_emoji_tbl.pl + $(PERL) mk_emoji_tbl.pl EmojiSources.txt + unidata: 8859-1.TXT 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT 8859-6.TXT \ 8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT 8859-11.TXT 8859-13.TXT \ -8859-14.TXT 8859-15.TXT 8859-16.TXT +8859-14.TXT 8859-15.TXT 8859-16.TXT EmojiSources.txt .PHONY: unidata diff --git a/ext/mbstring/libmbfl/filters/emoji2uni.h b/ext/mbstring/libmbfl/filters/emoji2uni.h new file mode 100644 index 0000000000..37f44c5964 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/emoji2uni.h @@ -0,0 +1,1227 @@ +static const int mb_tbl_code2uni_docomo1_min = 0x28c2; +static const int mb_tbl_code2uni_docomo1_max = 0x29db; + +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, 0x27bf, 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; + +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; + +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, + }; +static const int mb_tbl_code2uni_sb1_min = 0x27a9; +static const int mb_tbl_code2uni_sb1_max = 0x2861; + +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, 0x27bf, + 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}; + +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, + }; +static const int mb_tbl_code2uni_sb3_min = 0x2a99; +static const int mb_tbl_code2uni_sb3_max = 0x2b35; + +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}; + + + +static const int mb_tbl_uni_docomo2code1_min = 0x0023; +static const int mb_tbl_uni_docomo2code1_max = 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, }; + +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; + +static const unsigned short mb_tbl_uni_docomo2code2_key[] = { // 0x203c - 0x3299 + 0x203c, 0x2049, 0x2122, 0x2194, + 0x2195, 0x2196, 0x2197, 0x2198, + 0x2199, 0x21a9, 0x231a, 0x23f0, + 0x23f3, 0x24c2, 0x2600, 0x2601, + 0x260e, 0x2614, 0x2615, 0x2648, + 0x2649, 0x264a, 0x264b, 0x264c, + 0x264d, 0x264e, 0x264f, 0x2650, + 0x2651, 0x2652, 0x2653, 0x2660, + 0x2663, 0x2665, 0x2666, 0x2668, + 0x267b, 0x267f, 0x26a0, 0x26a1, + 0x26bd, 0x26be, 0x26c4, 0x26f3, + 0x26f5, 0x26fd, 0x2702, 0x2708, + 0x2709, 0x270a, 0x270b, 0x270c, + 0x270f, 0x2712, 0x2728, 0x2757, + 0x2764, 0x27b0, 0x27bf, 0x2934, + 0x2935, 0x3030, 0x3299, }; + +static const unsigned short mb_tbl_uni_docomo2code2_value[] = { // 0x203c - 0x3299 + 0x2988, 0x2987, 0x29b6, 0x29c0, + 0x29c1, 0x291b, 0x28fc, 0x291a, + 0x2929, 0x295e, 0x29a3, 0x293e, + 0x29a0, 0x28e0, 0x28c2, 0x28c3, + 0x290b, 0x28c4, 0x28f4, 0x28ca, + 0x28cb, 0x28cc, 0x28cd, 0x28ce, + 0x28cf, 0x28d0, 0x28d1, 0x28d2, + 0x28d3, 0x28d4, 0x28d5, 0x2912, + 0x2914, 0x2911, 0x2913, 0x297b, + 0x29b9, 0x291f, 0x29bb, 0x28c6, + 0x28da, 0x28d7, 0x28c5, 0x28d8, + 0x2927, 0x28ef, 0x28f9, 0x28e6, + 0x2957, 0x2917, 0x2919, 0x2918, + 0x299d, 0x2932, 0x297e, 0x2986, + 0x2970, 0x298e, 0x2963, 0x2979, + 0x2984, 0x298d, 0x29b8, }; + +static const int mb_tbl_uni_docomo2code2_len = sizeof(mb_tbl_uni_docomo2code2_key)/sizeof(unsigned short); + +static const int mb_tbl_uni_docomo2code3_min = 0x1f17f; +static const int mb_tbl_uni_docomo2code3_max = 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, }; + +static const unsigned short mb_tbl_uni_docomo2code3_value[] = { // 0x1f17f - 0x1f6bb + 0x28f0, 0x295f, 0x295b, 0x295c, + 0x2961, 0x29b3, 0x298f, 0x29bc, + 0x29bd, 0x29be, 0x29bf, 0x28c7, + 0x28c8, 0x28c9, 0x2937, 0x29c3, + 0x2920, 0x2922, 0x2921, 0x2924, + 0x2923, 0x29ca, 0x29c7, 0x29cc, + 0x29c5, 0x29cb, 0x29c8, 0x29c9, + 0x29c6, 0x28f7, 0x29cd, 0x29d0, + 0x29d1, 0x29ce, 0x28f3, 0x29a2, + 0x29cf, 0x29da, 0x28f5, 0x28f6, + 0x2908, 0x2909, 0x290a, 0x2928, + 0x28fd, 0x28fa, 0x28fb, 0x28fe, + 0x28ff, 0x2900, 0x2901, 0x2902, + 0x2930, 0x290f, 0x297a, 0x2983, + 0x28d6, 0x28d9, 0x28db, 0x28dc, + 0x28dd, 0x2996, 0x29b7, 0x28e7, + 0x28e8, 0x28e9, 0x28ea, 0x28eb, + 0x28ec, 0x28ed, 0x28ee, 0x29c2, + 0x29d2, 0x29d5, 0x29d3, 0x29d4, + 0x2926, 0x29d8, 0x2925, 0x29d9, + 0x2915, 0x2916, 0x2981, 0x29ab, + 0x299e, 0x291e, 0x2992, 0x2995, + 0x2993, 0x2906, 0x2931, 0x291d, + 0x28f8, 0x291c, 0x2935, 0x2994, + 0x297d, 0x299b, 0x299f, 0x2971, + 0x2972, 0x2973, 0x297c, 0x297f, + 0x2980, 0x2982, 0x2985, 0x2989, + 0x298a, 0x298b, 0x298c, 0x2999, + 0x295a, 0x2936, 0x299a, 0x2910, + 0x29b4, 0x2907, 0x290d, 0x28de, + 0x2954, 0x2953, 0x290c, 0x2952, + 0x2905, 0x290e, 0x2960, 0x295d, + 0x2997, 0x293d, 0x293c, 0x293b, + 0x299c, 0x29c4, 0x29d7, 0x2974, + 0x29a6, 0x29ae, 0x29ad, 0x29d6, + 0x29a5, 0x29aa, 0x29b0, 0x29a9, + 0x29a7, 0x29a4, 0x2977, 0x29ac, + 0x2976, 0x2975, 0x29a8, 0x29b2, + 0x29af, 0x29b1, 0x29db, 0x2978, + 0x28df, 0x28e1, 0x28e4, 0x28e2, + 0x28e3, 0x28e5, 0x28f1, 0x2962, + 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; + +static const unsigned short mb_tbl_uni_kddi2code1_key[] = { // 0x0023 - 0x00ae + 0x0023, 0x0030, 0x0031, 0x0032, + 0x0033, 0x0034, 0x0035, 0x0036, + 0x0037, 0x0038, 0x0039, 0x00a9, + 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, }; + +static const int mb_tbl_uni_kddi2code1_len = sizeof(mb_tbl_uni_kddi2code1_key)/sizeof(unsigned short); + +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, + 0x2199, 0x21a9, 0x21aa, 0x231a, + 0x231b, 0x23e9, 0x23ea, 0x23eb, + 0x23ec, 0x23f0, 0x23f3, 0x25aa, + 0x25ab, 0x25b6, 0x25c0, 0x25fb, + 0x25fc, 0x25fd, 0x25fe, 0x2600, + 0x2601, 0x260e, 0x2611, 0x2614, + 0x2615, 0x261d, 0x263a, 0x2648, + 0x2649, 0x264a, 0x264b, 0x264c, + 0x264d, 0x264e, 0x264f, 0x2650, + 0x2651, 0x2652, 0x2653, 0x2660, + 0x2663, 0x2665, 0x2666, 0x2668, + 0x267b, 0x267f, 0x2693, 0x26a0, + 0x26a1, 0x26aa, 0x26ab, 0x26bd, + 0x26be, 0x26c4, 0x26c5, 0x26ce, + 0x26d4, 0x26ea, 0x26f2, 0x26f3, + 0x26f5, 0x26fa, 0x26fd, 0x2702, + 0x2705, 0x2708, 0x2709, 0x270a, + 0x270b, 0x270c, 0x270f, 0x2712, + 0x2714, 0x2716, 0x2728, 0x2733, + 0x2734, 0x2744, 0x2747, 0x274c, + 0x274e, 0x2753, 0x2757, 0x2764, + 0x2795, 0x2796, 0x2797, 0x27a1, + 0x27b0, 0x2934, 0x2935, 0x2b05, + 0x2b06, 0x2b07, 0x2b1b, 0x2b1c, + 0x2b50, 0x2b55, 0x3297, 0x3299, + }; + +static const unsigned short mb_tbl_uni_kddi2code2_value[] = { // 0x2002 - 0x3299 + 0x2811, 0x2810, 0x2812, 0x2568, + 0x2567, 0x27d2, 0x27b7, 0x25b2, + 0x25b3, 0x27d0, 0x27d9, 0x27d1, + 0x27da, 0x27e1, 0x27e0, 0x27fe, + 0x27ff, 0x27b4, 0x27b3, 0x27c9, + 0x27c8, 0x2818, 0x2700, 0x27b6, + 0x27b5, 0x27b2, 0x27b1, 0x27bc, + 0x27bd, 0x27b8, 0x27b9, 0x270c, + 0x2711, 0x281a, 0x2840, 0x2710, + 0x281b, 0x277a, 0x277f, 0x2713, + 0x2714, 0x2715, 0x2716, 0x2717, + 0x2718, 0x2719, 0x271a, 0x271b, + 0x271c, 0x271d, 0x271e, 0x2825, + 0x2827, 0x24f0, 0x2826, 0x2740, + 0x25b1, 0x2703, 0x272d, 0x2705, + 0x270b, 0x27be, 0x27bf, 0x273a, + 0x273e, 0x2709, 0x2712, 0x271f, + 0x2708, 0x2852, 0x24ba, 0x281d, + 0x2738, 0x24bb, 0x27f5, 0x279a, + 0x27e2, 0x2737, 0x27a5, 0x25bb, + 0x282b, 0x282a, 0x2725, 0x2841, + 0x27db, 0x27d3, 0x24f6, 0x27c2, + 0x26fd, 0x270e, 0x26f0, 0x27d4, + 0x27d5, 0x2707, 0x2706, 0x2819, + 0x27c0, 0x27c1, 0x27d8, 0x27d6, + 0x2569, 0x2565, 0x2566, 0x27d7, + 0x27c3, 0x27c4, 0x27cd, 0x27cc, + 0x270f, 0x24f8, 0x24e4, 0x2775, + }; + +static const int mb_tbl_uni_kddi2code2_len = sizeof(mb_tbl_uni_kddi2code2_key)/sizeof(unsigned short); + +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, + }; + +static const unsigned short mb_tbl_uni_kddi2code3_value[] = { // 0x1f004 - 0x1f6c0 + 0x24bc, 0x25a7, 0x255e, 0x255f, + 0x2560, 0x272a, 0x2561, 0x282f, + 0x24d0, 0x27fc, 0x24d3, 0x284c, + 0x2831, 0x276c, 0x2793, 0x24bd, + 0x2549, 0x2546, 0x24c0, 0x2545, + 0x2548, 0x2547, 0x2750, 0x254a, + 0x24c1, 0x27f7, 0x24d2, 0x24d6, + 0x24d5, 0x24d4, 0x24d1, 0x24d7, + 0x277b, 0x283f, 0x26ed, 0x281c, + 0x2533, 0x253c, 0x253f, 0x24c5, + 0x253d, 0x2743, 0x25b4, 0x258b, + 0x2597, 0x2837, 0x282c, 0x282e, + 0x282d, 0x270a, 0x270d, 0x26ec, + 0x2570, 0x25b5, 0x2766, 0x24e1, + 0x2768, 0x274e, 0x2851, 0x24df, + 0x2767, 0x2581, 0x256e, 0x25ba, + 0x2797, 0x2752, 0x24b8, 0x256f, + 0x2506, 0x2507, 0x256c, 0x256a, + 0x2751, 0x2505, 0x256d, 0x256b, + 0x2504, 0x2592, 0x2571, 0x2756, + 0x2758, 0x275a, 0x2573, 0x2748, + 0x2574, 0x24fe, 0x2759, 0x24ff, + 0x2501, 0x2838, 0x2500, 0x24fa, + 0x24fc, 0x2572, 0x24fd, 0x2502, + 0x2503, 0x25a8, 0x2771, 0x24fb, + 0x2535, 0x2582, 0x2583, 0x2584, + 0x2585, 0x2586, 0x2587, 0x258e, + 0x2591, 0x2754, 0x2508, 0x2509, + 0x2755, 0x2730, 0x24f9, 0x24e2, + 0x2745, 0x2746, 0x2576, 0x2747, + 0x24e3, 0x2823, 0x2753, 0x2824, + 0x2539, 0x274d, 0x253b, 0x2863, + 0x2536, 0x24e6, 0x24e7, 0x26f3, + 0x2575, 0x24c4, 0x252e, 0x252f, + 0x2532, 0x2538, 0x253a, 0x2531, + 0x2530, 0x26f1, 0x252d, 0x257a, + 0x2787, 0x279b, 0x278c, 0x2820, + 0x2540, 0x2822, 0x2722, 0x2742, + 0x2821, 0x274a, 0x2749, 0x26f2, + 0x2528, 0x274c, 0x257b, 0x25a6, + 0x2855, 0x2789, 0x278a, 0x2578, + 0x2527, 0x278b, 0x2517, 0x273b, + 0x24f7, 0x281e, 0x273d, 0x273c, + 0x26ef, 0x2579, 0x24be, 0x273f, + 0x2529, 0x272f, 0x2847, 0x2731, + 0x24c9, 0x24ca, 0x272e, 0x2727, + 0x24cc, 0x253e, 0x2728, 0x24cb, + 0x2541, 0x2544, 0x2741, 0x2542, + 0x2543, 0x25b6, 0x255a, 0x255b, + 0x255c, 0x2557, 0x285e, 0x2537, + 0x2556, 0x2761, 0x258f, 0x2590, + 0x2555, 0x2757, 0x24bf, 0x24c6, + 0x2764, 0x25ae, 0x2760, 0x2558, + 0x2763, 0x255d, 0x2553, 0x2859, + 0x2559, 0x2857, 0x275b, 0x275f, + 0x2577, 0x26f4, 0x275c, 0x275d, + 0x2765, 0x2762, 0x275e, 0x2858, + 0x257e, 0x2580, 0x2772, 0x2828, + 0x2829, 0x251b, 0x251c, 0x257f, + 0x24d8, 0x24d9, 0x2783, 0x2784, + 0x2777, 0x2521, 0x251f, 0x277d, + 0x2520, 0x251e, 0x2860, 0x24e9, + 0x2782, 0x24de, 0x284d, 0x25af, + 0x25a3, 0x24ee, 0x24ef, 0x2791, + 0x2788, 0x2720, 0x284e, 0x2563, + 0x279e, 0x24ea, 0x2562, 0x2780, + 0x277e, 0x2785, 0x24c8, 0x2526, + 0x2534, 0x254b, 0x254c, 0x254d, + 0x254e, 0x254f, 0x2550, 0x2551, + 0x2552, 0x257c, 0x257d, 0x274f, + 0x2856, 0x2792, 0x2770, 0x2773, + 0x277c, 0x2554, 0x278d, 0x24eb, + 0x278f, 0x24ec, 0x24ed, 0x2794, + 0x24e5, 0x276f, 0x25b0, 0x2798, + 0x2861, 0x24e0, 0x2525, 0x25ad, + 0x26fb, 0x26fc, 0x24f1, 0x276e, + 0x24f2, 0x24f3, 0x24f4, 0x24f5, + 0x258c, 0x2833, 0x26fa, 0x2769, + 0x26fe, 0x26f9, 0x2834, 0x2835, + 0x276a, 0x2778, 0x2779, 0x276d, + 0x2594, 0x2781, 0x2774, 0x2776, + 0x274b, 0x27fd, 0x2800, 0x2801, + 0x2809, 0x2593, 0x24c7, 0x284f, + 0x24b9, 0x2806, 0x27e6, 0x2790, + 0x2813, 0x2814, 0x27e5, 0x27ed, + 0x27e7, 0x27ee, 0x27f0, 0x27f9, + 0x27fa, 0x27f8, 0x27e8, 0x27f1, + 0x27e4, 0x2724, 0x27f4, 0x2726, + 0x2849, 0x27f2, 0x27ef, 0x2721, + 0x27ec, 0x2723, 0x27e9, 0x27ea, + 0x27eb, 0x27f3, 0x27a1, 0x27e3, + 0x24dd, 0x27a2, 0x281f, 0x27a4, + 0x272c, 0x2816, 0x2817, 0x27a3, + 0x25a9, 0x2815, 0x259a, 0x279f, + 0x2848, 0x280f, 0x280c, 0x2846, + 0x24db, 0x24dc, 0x24cf, 0x2799, + 0x2802, 0x2786, 0x2850, 0x2804, + 0x284b, 0x2795, 0x2808, 0x280d, + 0x279c, 0x2843, 0x284a, 0x283a, + 0x279d, 0x27a0, 0x2796, 0x2845, + 0x280e, 0x2842, 0x2844, 0x24ce, + 0x27af, 0x283b, 0x283c, 0x283d, + 0x283e, 0x258d, 0x26ff, 0x2807, + 0x280b, 0x2862, 0x2805, 0x2803, + 0x278e, 0x24da, 0x2704, 0x27ce, + 0x27cf, 0x27ca, 0x27cb, 0x27ba, + 0x27bb, 0x27de, 0x27df, 0x27c7, + 0x27c6, 0x2854, 0x2744, 0x27f6, + 0x25a4, 0x25b8, 0x259c, 0x26f5, + 0x285a, 0x2518, 0x2510, 0x285b, + 0x250a, 0x2514, 0x285d, 0x250b, + 0x250e, 0x251a, 0x2519, 0x276b, + 0x26f6, 0x2595, 0x25a1, 0x250d, + 0x250c, 0x2511, 0x259f, 0x250f, + 0x26f8, 0x26f7, 0x2516, 0x285c, + 0x2515, 0x2513, 0x2832, 0x2512, + 0x25b7, 0x259b, 0x2599, 0x259d, + 0x25a2, 0x2598, 0x2596, 0x25a0, + 0x259e, 0x2522, 0x2523, 0x2524, + 0x2588, 0x258a, 0x2589, 0x25bd, + 0x25be, 0x25bf, 0x25c0, 0x251d, + 0x285f, 0x2739, 0x2734, 0x2853, + 0x25a5, 0x2733, 0x272b, 0x252b, + 0x252a, 0x252c, 0x2735, 0x2736, + 0x24cd, 0x26ee, 0x24c2, 0x25ab, + 0x2564, 0x27c5, 0x2701, 0x2702, + 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; + +static const unsigned short mb_tbl_uni_sb2code1_key[] = { // 0x0023 - 0x00ae + 0x0023, 0x0030, 0x0031, 0x0032, + 0x0033, 0x0034, 0x0035, 0x0036, + 0x0037, 0x0038, 0x0039, 0x00a9, + 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, }; + +static const int mb_tbl_uni_sb2code1_len = sizeof(mb_tbl_uni_sb2code1_key)/sizeof(unsigned short); + +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, + 0x2614, 0x2615, 0x261d, 0x263a, + 0x2648, 0x2649, 0x264a, 0x264b, + 0x264c, 0x264d, 0x264e, 0x264f, + 0x2650, 0x2651, 0x2652, 0x2653, + 0x2660, 0x2663, 0x2665, 0x2666, + 0x2668, 0x267f, 0x26a0, 0x26a1, + 0x26bd, 0x26be, 0x26c4, 0x26ce, + 0x26ea, 0x26f2, 0x26f3, 0x26f5, + 0x26fa, 0x26fd, 0x2702, 0x2708, + 0x270a, 0x270b, 0x270c, 0x2728, + 0x2733, 0x2734, 0x274c, 0x2753, + 0x2754, 0x2755, 0x2757, 0x2764, + 0x27a1, 0x27bf, 0x2b05, 0x2b06, + 0x2b07, 0x2b50, 0x2b55, 0x303d, + 0x3297, 0x3299, }; + +static const unsigned short mb_tbl_uni_sb2code2_value[] = { // 0x2122 - 0x3299 + 0x2b2e, 0x283e, 0x283d, 0x283f, + 0x2840, 0x2843, 0x2844, 0x2841, + 0x2842, 0x296a, 0x2969, 0x2929, + 0x296b, 0x2965, 0x292f, 0x2aac, + 0x2846, 0x2847, 0x2848, 0x2849, + 0x284a, 0x284b, 0x284c, 0x284d, + 0x284e, 0x284f, 0x2850, 0x2851, + 0x2815, 0x2816, 0x2813, 0x2814, + 0x27cb, 0x2811, 0x2859, 0x27e5, + 0x2938, 0x2936, 0x2968, 0x2852, + 0x2957, 0x27c9, 0x2934, 0x293c, + 0x27ca, 0x295a, 0x2992, 0x293d, + 0x2930, 0x2932, 0x2931, 0x29ad, + 0x280d, 0x280c, 0x29b2, 0x2940, + 0x29b5, 0x29b6, 0x2941, 0x2942, + 0x283b, 0x2818, 0x283c, 0x2839, + 0x283a, 0x29ae, 0x29b1, 0x27d4, + 0x298c, 0x2994, }; + +static const int mb_tbl_uni_sb2code2_len = sizeof(mb_tbl_uni_sb2code2_key)/sizeof(unsigned short); + +static const int mb_tbl_uni_sb2code3_min = 0x1f004; +static const int mb_tbl_uni_sb2code3_max = 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, + 0x2b0a, 0x2b05, 0x2b08, 0x2b04, + 0x2b07, 0x2b06, 0x2b02, 0x2b0b, + 0x2b09, 0x2b03, 0x280a, 0x282f, + 0x281d, 0x2833, 0x2832, 0x2831, + 0x281c, 0x281e, 0x281f, 0x282e, + 0x2834, 0x282d, 0x2adb, 0x2ad4, + 0x2ae3, 0x296d, 0x2ae1, 0x27ee, + 0x2ae2, 0x2ae4, 0x2ad6, 0x296c, + 0x29b4, 0x2986, 0x2987, 0x2983, + 0x2950, 0x2952, 0x2982, 0x2984, + 0x2adc, 0x27b8, 0x27c0, 0x27c1, + 0x2adf, 0x29c8, 0x29c9, 0x29c7, + 0x29c5, 0x29c4, 0x29c6, 0x27c8, + 0x29bc, 0x29c1, 0x29bd, 0x29c0, + 0x29bf, 0x29be, 0x29b8, 0x29ba, + 0x29bb, 0x29c2, 0x29c3, 0x29b9, + 0x2ad7, 0x2966, 0x29cb, 0x29cc, + 0x27ef, 0x2963, 0x29b7, 0x298a, + 0x2964, 0x2967, 0x298b, 0x2993, + 0x27ba, 0x29ca, 0x2add, 0x2953, + 0x2ae0, 0x27bf, 0x2ad8, 0x298f, + 0x2991, 0x27eb, 0x2ace, 0x2ad0, + 0x2ad3, 0x2ada, 0x2ade, 0x2ad2, + 0x2ad1, 0x27cc, 0x2acb, 0x295c, + 0x295d, 0x2afe, 0x2989, 0x2af9, + 0x2afa, 0x27cd, 0x29a3, 0x27d8, + 0x27db, 0x2ac4, 0x295e, 0x29a5, + 0x2960, 0x2961, 0x2962, 0x2935, + 0x2933, 0x2ac2, 0x27da, 0x27bd, + 0x2937, 0x27d9, 0x2ac3, 0x2ac5, + 0x2956, 0x2958, 0x27fb, 0x27fd, + 0x27f5, 0x27fc, 0x2800, 0x2af8, + 0x27fe, 0x27ff, 0x2afb, 0x2aff, + 0x2afc, 0x2afd, 0x2b24, 0x27dc, + 0x2b20, 0x2b1f, 0x2b25, 0x2b26, + 0x2b1d, 0x27b2, 0x2ad9, 0x2b1c, + 0x2939, 0x2b19, 0x2b1a, 0x2b18, + 0x2975, 0x2b1e, 0x2b27, 0x2b17, + 0x2973, 0x2b22, 0x2970, 0x2b23, + 0x296f, 0x2974, 0x293a, 0x27b1, + 0x2972, 0x27b3, 0x2b28, 0x2b1b, + 0x2b21, 0x2971, 0x2ab1, 0x2ab3, + 0x2ab2, 0x2ab4, 0x2835, 0x2836, + 0x2837, 0x2838, 0x292d, 0x2ab6, + 0x2ab8, 0x292e, 0x2ab9, 0x2ab7, + 0x2aba, 0x27b6, 0x2997, 0x2981, + 0x2926, 0x2998, 0x29a0, 0x29a1, + 0x29a2, 0x2927, 0x27e6, 0x2999, + 0x299a, 0x2b2d, 0x2921, 0x2922, + 0x2924, 0x2925, 0x2ac0, 0x27fa, + 0x2ac1, 0x2b0c, 0x2b0d, 0x2b0e, + 0x2b0f, 0x2b10, 0x2b11, 0x2b12, + 0x2b13, 0x27c3, 0x296e, 0x27b4, + 0x27d3, 0x27c2, 0x27c4, 0x285a, + 0x2b15, 0x2b16, 0x299b, 0x299c, + 0x299d, 0x299e, 0x299f, 0x27e3, + 0x298e, 0x2923, 0x2954, 0x2955, + 0x27b9, 0x2985, 0x2abd, 0x2ad5, + 0x29a6, 0x2943, 0x29a7, 0x29a8, + 0x29a9, 0x29aa, 0x29ab, 0x29ac, + 0x2acf, 0x280b, 0x27b7, 0x29b3, + 0x2990, 0x27e4, 0x29b0, 0x29af, + 0x297a, 0x27f4, 0x27d7, 0x27f1, + 0x27f2, 0x27c7, 0x292c, 0x27c6, + 0x2995, 0x27ce, 0x27cf, 0x27f0, + 0x2980, 0x292b, 0x27f3, 0x27ea, + 0x2996, 0x27ab, 0x27a9, 0x27aa, + 0x292a, 0x27ac, 0x2857, 0x2858, + 0x2812, 0x2928, 0x27d2, 0x27d0, + 0x27d1, 0x27e9, 0x27bc, 0x295f, + 0x27ec, 0x27ed, 0x29a4, 0x2853, + 0x280e, 0x27c5, 0x27be, 0x27bb, + 0x2845, 0x2810, 0x2951, 0x2821, + 0x2822, 0x2820, 0x2944, 0x2945, + 0x2946, 0x2947, 0x2948, 0x2949, + 0x294a, 0x294b, 0x294c, 0x294d, + 0x294e, 0x294f, 0x295b, 0x2b00, + 0x2b14, 0x2a9c, 0x2aaa, 0x2977, + 0x2aad, 0x2a9d, 0x2976, 0x2aa2, + 0x27ae, 0x2a9a, 0x2aa6, 0x27b0, + 0x2a9b, 0x2a9f, 0x2ab0, 0x2aaf, + 0x27ad, 0x2aa1, 0x2978, 0x2979, + 0x2aae, 0x2aab, 0x2a9e, 0x2a99, + 0x2aa3, 0x2aa0, 0x2aa9, 0x2aa7, + 0x27af, 0x2aa8, 0x2aa5, 0x2aa4, + 0x2abb, 0x2abc, 0x2abe, 0x2abf, + 0x2ab5, 0x27b5, 0x293e, 0x2acd, + 0x293f, 0x2acc, 0x2959, 0x2801, + 0x27f8, 0x2ac9, 0x2ac8, 0x2aca, + 0x2802, 0x293b, 0x2ac6, 0x2ac7, + 0x2809, 0x27dd, 0x27f6, 0x27df, + 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_ascii.c b/ext/mbstring/libmbfl/filters/mbfilter_ascii.c index 34366db6c0..77871fb96d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ascii.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ascii.c @@ -37,7 +37,7 @@ static int mbfl_filt_ident_ascii(int c, mbfl_identify_filter *filter); -static const char *mbfl_encoding_ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL}; +static const char *mbfl_encoding_ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "IBM-367", "cp367", "csASCII", NULL}; const mbfl_encoding mbfl_encoding_ascii = { mbfl_no_encoding_ascii, diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index 13341f9e9f..198f38c3d2 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -41,7 +41,7 @@ const mbfl_encoding mbfl_encoding_base64 = { "BASE64", NULL, NULL, - MBFL_ENCTYPE_SBCS + MBFL_ENCTYPE_ENC_STRM | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_convert_vtbl vtbl_8bit_b64 = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index fe5effe044..099f8e6af0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -57,7 +57,7 @@ static const unsigned char mblen_table_big5[] = { /* 0x81-0xFE */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 }; -static const char *mbfl_encoding_big5_aliases[] = {"CN-BIG5", "BIG-FIVE", "BIGFIVE", "CP950", NULL}; +static const char *mbfl_encoding_big5_aliases[] = {"CN-BIG5", "BIG-FIVE", "BIGFIVE", NULL}; const mbfl_encoding mbfl_encoding_big5 = { mbfl_no_encoding_big5, @@ -65,7 +65,16 @@ const mbfl_encoding mbfl_encoding_big5 = { "BIG5", (const char *(*)[])&mbfl_encoding_big5_aliases, mblen_table_big5, - MBFL_ENCTYPE_MBCS + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const mbfl_encoding mbfl_encoding_cp950 = { + mbfl_no_encoding_cp950, + "CP950", + "BIG5", + NULL, + mblen_table_big5, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_big5 = { @@ -75,6 +84,13 @@ const struct mbfl_identify_vtbl vtbl_identify_big5 = { mbfl_filt_ident_big5 }; +const struct mbfl_identify_vtbl vtbl_identify_cp950 = { + mbfl_no_encoding_cp950, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_big5 +}; + const struct mbfl_convert_vtbl vtbl_big5_wchar = { mbfl_no_encoding_big5, mbfl_no_encoding_wchar, @@ -93,21 +109,57 @@ const struct mbfl_convert_vtbl vtbl_wchar_big5 = { mbfl_filt_conv_common_flush }; +const struct mbfl_convert_vtbl vtbl_cp950_wchar = { + mbfl_no_encoding_cp950, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_big5_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_cp950 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_cp950, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_big5, + mbfl_filt_conv_common_flush +}; + #define CK(statement) do { if ((statement) < 0) return (-1); } while (0) +/* 63 + 94 = 157 or 94 */ +static unsigned short cp950_pua_tbl[][4] = { + {0xe000,0xe310,0xfa40,0xfefe}, + {0xe311,0xeeb7,0x8e40,0xa0fe}, + {0xeeb8,0xf6b0,0x8140,0x8dfe}, + {0xf6b1,0xf70e,0xc6a1,0xc6fe}, + {0xf70f,0xf848,0xc740,0xc8fe}, +}; + /* * Big5 => wchar */ int mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter) { - int c1, w; + int k; + int c1, w, c2; switch (filter->status) { case 0: - if (c >= 0 && c < 0x80) { /* latin */ + if (filter->from->no_encoding == mbfl_no_encoding_cp950) { + c1 = 0x80; + } else { + c1 = 0xa0; + } + + if (c >= 0 && c <= 0x80) { /* latin */ CK((*filter->output_function)(c, filter->data)); - } else if (c > 0xa0 && c < 0xff) { /* dbcs lead byte */ + } else if (c == 0xff) { + CK((*filter->output_function)(0xf8f8, filter->data)); + } else if (c > c1 && c < 0xff) { /* dbcs lead byte */ filter->status = 1; filter->cache = c; } else { @@ -131,6 +183,30 @@ mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter) } else { w = 0; } + + if (filter->from->no_encoding == mbfl_no_encoding_cp950) { + /* PUA for CP950 */ + if (w <= 0 && + (((c1 >= 0xfa && c1 <= 0xfe) || (c1 >= 0x8e && c1 <= 0xa0) || + (c1 >= 0x81 && c1 <= 0x8d) ||(c1 >= 0xc7 && c1 <= 0xc8)) + && ((c > 0x39 && c < 0x7f) || (c > 0xa0 && c < 0xff))) || + ((c1 == 0xc6) && (c > 0xa0 && c < 0xff))) { + c2 = c1 << 8 | c; + for (k = 0; k < sizeof(cp950_pua_tbl)/(sizeof(unsigned short)*4); k++) { + if (c2 >= cp950_pua_tbl[k][2] && c2 <= cp950_pua_tbl[k][3]) { + break; + } + } + + if ((cp950_pua_tbl[k][2] & 0xff) == 0x40) { + w = 157*(c1 - (cp950_pua_tbl[k][2]>>8)) + c - (c >= 0xa1 ? 0x62 : 0x40) + + cp950_pua_tbl[k][0]; + } else { + w = c2 - cp950_pua_tbl[k][2] + cp950_pua_tbl[k][0]; + } + } + } + if (w <= 0) { w = (c1 << 8) | c; w &= MBFL_WCSPLANE_MASK; @@ -161,7 +237,8 @@ mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter) int mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter) { - int c1, s; + int k; + int c1, s, c2; s = 0; if (c >= ucs_a1_big5_table_min && c < ucs_a1_big5_table_max) { @@ -179,6 +256,39 @@ mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter) } else if (c >= ucs_r2_big5_table_min && c < ucs_r2_big5_table_max) { s = ucs_r2_big5_table[c - ucs_r2_big5_table_min]; } + + if (filter->to->no_encoding == mbfl_no_encoding_cp950) { + if (c >= 0xe000 && c <= 0xf848) { /* PUA for CP950 */ + for (k = 0; k < sizeof(cp950_pua_tbl)/(sizeof(unsigned short)*4); k++) { + if (c <= cp950_pua_tbl[k][1]) { + break; + } + } + c1 = c - cp950_pua_tbl[k][0]; + if ((cp950_pua_tbl[k][2] & 0xff) == 0x40) { + c2 = cp950_pua_tbl[k][2] >> 8; + s = ((c1 / 157) + c2) << 8; c1 %= 157; + s |= c1 + (c1 >= 0x3f ? 0x62 : 0x40); + } else { + s = c1 + cp950_pua_tbl[k][2]; + } + } + + if (c == 0x80) { + s = 0x80; + } else if (c == 0xf8f8) { + s = 0xff; + } else if (c == 0x256d) { + s = 0xa27e; + } else if (c == 0x256e) { + s = 0xa2a1; + } else if (c == 0x256f) { + s = 0xa2a3; + } else if (c == 0x2570) { + s = 0xa2a2; + } + } + if (s <= 0) { c1 = c & ~MBFL_WCSPLANE_MASK; if (c1 == MBFL_WCSPLANE_BIG5) { @@ -191,7 +301,7 @@ mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter) } } if (s >= 0) { - if (s < 0x80) { /* latin */ + if (s <= 0x80 || s == 0xff) { /* latin */ CK((*filter->output_function)(s, filter->data)); } else { CK((*filter->output_function)((s >> 8) & 0xff, filter->data)); @@ -208,6 +318,13 @@ mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter) static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter) { + int c1; + if (filter->encoding->no_encoding == mbfl_no_encoding_cp950) { + c1 = 0x80; + } else { + c1 = 0xa0; + } + if (filter->status) { /* kanji second char */ if (c < 0x40 || (c > 0x7e && c < 0xa1) ||c > 0xfe) { /* bad */ filter->flag = 1; @@ -215,7 +332,7 @@ static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter) filter->status = 0; } else if (c >= 0 && c < 0x80) { /* latin ok */ ; - } else if (c > 0xa0 && c < 0xff) { /* DBCS lead byte */ + } else if (c > c1 && c < 0xff) { /* DBCS lead byte */ filter->status = 1; } else { /* bad */ filter->flag = 1; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.h b/ext/mbstring/libmbfl/filters/mbfilter_big5.h index 6b6a26563b..93d10de61a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.h @@ -37,6 +37,11 @@ extern const struct mbfl_identify_vtbl vtbl_identify_big5; extern const struct mbfl_convert_vtbl vtbl_big5_wchar; extern const struct mbfl_convert_vtbl vtbl_wchar_big5; +extern const mbfl_encoding mbfl_encoding_cp950; +extern const struct mbfl_identify_vtbl vtbl_identify_cp950; +extern const struct mbfl_convert_vtbl vtbl_cp950_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_cp950; + int mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter); diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c index 587bff88cf..8d733a9d19 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -54,7 +54,7 @@ const mbfl_encoding mbfl_encoding_jis_ms = { "ISO-2022-JP", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const mbfl_encoding mbfl_encoding_cp50220 = { @@ -63,7 +63,7 @@ const mbfl_encoding mbfl_encoding_cp50220 = { "ISO-2022-JP", (const char *(*)[])NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const mbfl_encoding mbfl_encoding_cp50220raw = { @@ -72,7 +72,7 @@ const mbfl_encoding mbfl_encoding_cp50220raw = { "ISO-2022-JP", (const char *(*)[])NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const mbfl_encoding mbfl_encoding_cp50221 = { @@ -81,7 +81,7 @@ const mbfl_encoding mbfl_encoding_cp50221 = { "ISO-2022-JP", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const mbfl_encoding mbfl_encoding_cp50222 = { @@ -90,7 +90,7 @@ const mbfl_encoding mbfl_encoding_cp50222 = { "ISO-2022-JP", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_jis_ms = { @@ -250,7 +250,7 @@ retry: CK((*filter->output_function)(0x203e, filter->data)); } else if (filter->status == 0x20 && c > 0x20 && c < 0x60) { /* kana */ CK((*filter->output_function)(0xff40 + c, filter->data)); - } else if ((filter->status == 0x80 || filter->status == 0x90) && c > 0x20 && c < 0x7f) { /* kanji first char */ + } else if ((filter->status == 0x80 || filter->status == 0x90) && c > 0x20 && c < 0x93) { /* kanji first char */ filter->cache = c; filter->status += 1; } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ @@ -282,10 +282,7 @@ retry: w = cp932ext3_ucs_table[s - cp932ext3_ucs_table_min]; } else if (s >= 94 * 94 && s < 114 * 94) { /* user-defined => PUA (Microsoft extended) */ - w = (s & 0xff) + ((s >> 8) - 94) * 94 + 0xe000; - } else if (s >= 212 * 94 && s < 222 * 94) { - /* user-defined => PUA (G3 85 - 94 Ku) */ - w = (s & 0xff) + ((s >> 8) - 212) * 94 + 0xe000 + 10 * 94; + w = s - 94*94 + 0xe000; } else { w = 0; } @@ -462,7 +459,7 @@ mbfl_filt_conv_wchar_jis_ms(int c, mbfl_convert_filter *filter) s = 0x224c; } } - if (s <= 0 || s >= 0x8080 && s < 0x10000) { + if (s <= 0 || (s >= 0x8080 && s < 0x10000)) { int i; s = -1; @@ -693,7 +690,7 @@ mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter) s = 0x224c; } } - if (s <= 0 || s >= 0x8080 && s < 0x10000) { + if (s <= 0 || (s >= 0x8080 && s < 0x10000)) { int i; s = -1; @@ -841,7 +838,7 @@ mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter) s = 0x224c; } } - if (s <= 0 || s >= 0x8080 && s < 0x10000) { + if (s <= 0 || (s >= 0x8080 && s < 0x10000)) { int i; s = -1; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp850.c b/ext/mbstring/libmbfl/filters/mbfilter_cp850.c index 5388c048b1..9e4696a5a9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp850.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp850.c @@ -33,7 +33,7 @@ static int mbfl_filt_ident_cp850(int c, mbfl_identify_filter *filter); -static const char *mbfl_encoding_cp850_aliases[] = {"CP850", "CP-850", "IBM-850", NULL}; +static const char *mbfl_encoding_cp850_aliases[] = {"CP850", "CP-850", "IBM850", "IBM-850", NULL}; const mbfl_encoding mbfl_encoding_cp850 = { mbfl_no_encoding_cp850, diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp866.c b/ext/mbstring/libmbfl/filters/mbfilter_cp866.c index 7725d7a266..22e109fe5b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp866.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp866.c @@ -37,7 +37,7 @@ static int mbfl_filt_ident_cp866(int c, mbfl_identify_filter *filter); -static const char *mbfl_encoding_cp866_aliases[] = {"CP866", "CP-866", "IBM-866", NULL}; +static const char *mbfl_encoding_cp866_aliases[] = {"CP866", "CP-866", "IBM866", "IBM-866", NULL}; const mbfl_encoding mbfl_encoding_cp866 = { mbfl_no_encoding_cp866, diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c index 6e54d53f44..40ba849651 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c @@ -66,7 +66,7 @@ const mbfl_encoding mbfl_encoding_cp932 = { "Shift_JIS", (const char *(*)[])&mbfl_encoding_cp932_aliases, mblen_table_sjis, - MBFL_ENCTYPE_MBCS + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_cp932 = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 561dc3003b..caf26e329b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -33,7 +33,7 @@ #include "mbfilter.h" #include "mbfilter_cp936.h" - +#define UNICODE_TABLE_CP936_DEF #include "unicode_table_cp936.h" static int mbfl_filt_ident_cp936(int c, mbfl_identify_filter *filter); @@ -65,7 +65,7 @@ const mbfl_encoding mbfl_encoding_cp936 = { "CP936", (const char *(*)[])&mbfl_encoding_cp936_aliases, mblen_table_cp936, - MBFL_ENCTYPE_MBCS + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_cp936 = { @@ -102,7 +102,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_cp936 = { int mbfl_filt_conv_cp936_wchar(int c, mbfl_convert_filter *filter) { - int c1, w; + int k; + int c1, c2, w = -1; switch (filter->status) { case 0: @@ -110,39 +111,68 @@ mbfl_filt_conv_cp936_wchar(int c, mbfl_convert_filter *filter) CK((*filter->output_function)(c, filter->data)); } else if (c == 0x80) { /* euro sign */ CK((*filter->output_function)(0x20ac, filter->data)); - } else if (c > 0x80 && c < 0xff) { /* dbcs lead byte */ + } else if (c < 0xff) { /* dbcs lead byte */ filter->status = 1; filter->cache = c; - } else { - w = c & MBFL_WCSGROUP_MASK; - w |= MBFL_WCSGROUP_THROUGH; - CK((*filter->output_function)(w, filter->data)); + } else { /* 0xff */ + CK((*filter->output_function)(0xf8f5, filter->data)); } break; case 1: /* dbcs second byte */ filter->status = 0; c1 = filter->cache; - if ( c1 < 0xff && c1 > 0x80 && c > 0x39 && c < 0xff && c != 0x7f) { - w = (c1 - 0x81)*192 + (c - 0x40); - if (w >= 0 && w < cp936_ucs_table_size) { - w = cp936_ucs_table[w]; - } else { - w = 0; + + if (((c1 >= 0xaa && c1 <= 0xaf) || (c1 >= 0xf8 && c1 <= 0xfe)) && + (c >= 0xa1 && c <= 0xfe)) { + /* UDA part1,2: U+E000-U+E4C5 */ + w = 94*(c1 >= 0xf8 ? c1 - 0xf2 : c1 - 0xaa) + (c - 0xa1) + 0xe000; + CK((*filter->output_function)(w, filter->data)); + } else if (c1 >= 0xa1 && c1 <= 0xa7 && c >= 0x40 && c < 0xa1 && c != 0x7f) { + /* UDA part3 : U+E4C6-U+E765*/ + w = 96*(c1 - 0xa1) + c - (c >= 0x80 ? 0x41 : 0x40) + 0xe4c6; + CK((*filter->output_function)(w, filter->data)); + } + + c2 = (c1 << 8) | c; + + if (w <= 0 && + ((c2 >= 0xa2ab && c2 <= 0xa9f0 + (0xe80f-0xe801)) || + (c2 >= 0xd7fa && c2 <= 0xd7fa + (0xe814-0xe810)) || + (c2 >= 0xfe50 && c2 <= 0xfe80 + (0xe864-0xe844)))) { + for (k = 0; k < mbfl_cp936_pua_tbl_max; k++) { + if (c2 >= mbfl_cp936_pua_tbl[k][2] && + c2 <= mbfl_cp936_pua_tbl[k][2] + + mbfl_cp936_pua_tbl[k][1] - mbfl_cp936_pua_tbl[k][0]) { + w = c2 - mbfl_cp936_pua_tbl[k][2] + mbfl_cp936_pua_tbl[k][0]; + CK((*filter->output_function)(w, filter->data)); + break; + } } - if (w <= 0) { + } + + if (w <= 0) { + if (c1 < 0xff && c1 > 0x80 && c > 0x39 && c < 0xff && c != 0x7f) { + w = (c1 - 0x81)*192 + (c - 0x40); + if (w >= 0 && w < cp936_ucs_table_size) { + w = cp936_ucs_table[w]; + } else { + w = 0; + } + if (w <= 0) { + w = (c1 << 8) | c; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_WINCP936; + } + CK((*filter->output_function)(w, filter->data)); + } else if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else { w = (c1 << 8) | c; - w &= MBFL_WCSPLANE_MASK; - w |= MBFL_WCSPLANE_WINCP936; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); } - CK((*filter->output_function)(w, filter->data)); - } 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; @@ -160,25 +190,75 @@ mbfl_filt_conv_cp936_wchar(int c, mbfl_convert_filter *filter) int mbfl_filt_conv_wchar_cp936(int c, mbfl_convert_filter *filter) { - int c1, s; + int k, k1, k2; + int c1, s = 0; - s = 0; if (c >= ucs_a1_cp936_table_min && c < ucs_a1_cp936_table_max) { + /* U+0000 - U+0451 */ s = ucs_a1_cp936_table[c - ucs_a1_cp936_table_min]; } else if (c >= ucs_a2_cp936_table_min && c < ucs_a2_cp936_table_max) { - s = ucs_a2_cp936_table[c - ucs_a2_cp936_table_min]; + /* U+2000 - U+26FF */ + if (c == 0x203e) { + s = 0xa3fe; + } else if (c == 0x2218) { + s = 0xa1e3; + } else if (c == 0x223c) { + s = 0xa1ab; + } else { + s = ucs_a2_cp936_table[c - ucs_a2_cp936_table_min]; + } } else if (c >= ucs_a3_cp936_table_min && c < ucs_a3_cp936_table_max) { + /* U+2F00 - U+33FF */ s = ucs_a3_cp936_table[c - ucs_a3_cp936_table_min]; } else if (c >= ucs_i_cp936_table_min && c < ucs_i_cp936_table_max) { + /* U+4D00-9FFF CJK Unified Ideographs (+ Extension A) */ s = ucs_i_cp936_table[c - ucs_i_cp936_table_min]; + } else if (c >= 0xe000 && c <= 0xe864) { /* PUA */ + if (c < 0xe766) { + if (c < 0xe4c6) { + c1 = c - 0xe000; + s = (c1 % 94) + 0xa1; c1 /= 94; + s |= (c1 < 0x06 ? c1 + 0xaa : c1 + 0xf2) << 8; + } else { + c1 = c - 0xe4c6; + s = ((c1 / 96) + 0xa1) << 8; c1 %= 96; + s |= c1 + (c1 >= 0x3f ? 0x41 : 0x40); + } + } else { + /* U+E766..U+E864 */ + k1 = 0; k2 = mbfl_cp936_pua_tbl_max; + while (k1 < k2) { + k = (k1 + k2) >> 1; + if (c < mbfl_cp936_pua_tbl[k][0]) { + k2 = k; + } else if (c > mbfl_cp936_pua_tbl[k][1]) { + k1 = k + 1; + } else { + s = c - mbfl_cp936_pua_tbl[k][0] + mbfl_cp936_pua_tbl[k][2]; + break; + } + } + } + } else if (c == 0xf8f5) { + s = 0xff; } else if (c >= ucs_ci_cp936_table_min && c < ucs_ci_cp936_table_max) { + /* U+F900-FA2F CJK Compatibility Ideographs */ s = ucs_ci_cp936_table[c - ucs_ci_cp936_table_min]; } else if (c >= ucs_cf_cp936_table_min && c < ucs_cf_cp936_table_max) { s = ucs_cf_cp936_table[c - ucs_cf_cp936_table_min]; } else if (c >= ucs_sfv_cp936_table_min && c < ucs_sfv_cp936_table_max) { - s = ucs_sfv_cp936_table[c - ucs_sfv_cp936_table_min]; - } else if (c >= ucs_hff_cp936_table_min && c < ucs_hff_cp936_table_max) { - s = ucs_hff_cp936_table[c - ucs_hff_cp936_table_min]; + s = ucs_sfv_cp936_table[c - ucs_sfv_cp936_table_min]; /* U+FE50-FE6F Small Form Variants */ + } else if (c >= ucs_hff_cp936_table_min && c < ucs_hff_cp936_table_max) { + /* U+FF00-FFFF HW/FW Forms */ + if (c == 0xff04) { + s = 0xa1e7; + } else if (c == 0xff5e) { + s = 0xa1ab; + } else if (c >= 0xff01 && c <= 0xff5d) { + s = c - 0xff01 + 0xa3a1; + } else if (c >= 0xffe0 && c <= 0xffe5) { + s = ucs_hff_s_cp936_table[c-0xffe0]; + } } if (s <= 0) { c1 = c & ~MBFL_WCSPLANE_MASK; @@ -192,7 +272,7 @@ mbfl_filt_conv_wchar_cp936(int c, mbfl_convert_filter *filter) } } if (s >= 0) { - if (s <= 0x80) { /* latin */ + if (s <= 0x80 || s == 0xff) { /* latin */ CK((*filter->output_function)(s, filter->data)); } else { CK((*filter->output_function)((s >> 8) & 0xff, filter->data)); @@ -224,5 +304,3 @@ static int mbfl_filt_ident_cp936(int c, mbfl_identify_filter *filter) return c; } - - diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c index cc2bcc1cee..f91edf364a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c @@ -169,7 +169,15 @@ mbfl_filt_conv_wchar_euccn(int c, mbfl_convert_filter *filter) } else if (c >= ucs_i_cp936_table_min && c < ucs_i_cp936_table_max) { s = ucs_i_cp936_table[c - ucs_i_cp936_table_min]; } else if (c >= ucs_hff_cp936_table_min && c < ucs_hff_cp936_table_max) { - s = ucs_hff_cp936_table[c - ucs_hff_cp936_table_min]; + if (c == 0xff04) { + s = 0xa1e7; + } else if (c == 0xff5e) { + s = 0xa1ab; + } else if (c >= 0xff01 && c <= 0xff5d) { + s = c - 0xff01 + 0xa3a1; + } else if (c >= 0xffe0 && c <= 0xffe5) { + s = ucs_hff_s_cp936_table[c-0xffe0]; + } } c1 = (s >> 8) & 0xff; c2 = s & 0xff; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c index f5c9643772..7015df4eae 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c @@ -37,9 +37,9 @@ #include "unicode_table_cp932_ext.h" #include "unicode_table_jis.h" -static int mbfl_filt_ident_eucjp(int c, mbfl_identify_filter *filter); +int mbfl_filt_ident_eucjp(int c, mbfl_identify_filter *filter); -static const unsigned char mblen_table_eucjp[] = { /* 0xA1-0xFE */ +const unsigned char mblen_table_eucjp[] = { /* 0xA1-0xFE */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -275,7 +275,7 @@ mbfl_filt_conv_wchar_eucjp(int c, mbfl_convert_filter *filter) return c; } -static int mbfl_filt_ident_eucjp(int c, mbfl_identify_filter *filter) +int mbfl_filt_ident_eucjp(int c, mbfl_identify_filter *filter) { switch (filter->status) { case 0: /* latin */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c new file mode 100644 index 0000000000..2905ce8dfa --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.c @@ -0,0 +1,78 @@ +/* + * "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_ja.c + * by rui hirokawa <hirokawa@php.net> on 16 aug 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_euc_jp_2004.h" +#include "mbfilter_sjis_2004.h" + +#include "unicode_table_jis2004.h" + +extern int mbfl_filt_ident_eucjp(int c, mbfl_identify_filter *filter); +extern const unsigned char mblen_table_eucjp[]; + +static const char *mbfl_encoding_eucjp2004_aliases[] = {"EUC_JP-2004", NULL}; + +const mbfl_encoding mbfl_encoding_eucjp2004 = { + mbfl_no_encoding_eucjp2004, + "EUC-JP-2004", + "EUC-JP", + (const char *(*)[])&mbfl_encoding_eucjp2004_aliases, + mblen_table_eucjp, + MBFL_ENCTYPE_MBCS +}; + +const struct mbfl_identify_vtbl vtbl_identify_eucjp2004 = { + mbfl_no_encoding_eucjp2004, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_eucjp +}; + +const struct mbfl_convert_vtbl vtbl_eucjp2004_wchar = { + mbfl_no_encoding_eucjp2004, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis2004_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_eucjp2004 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_eucjp2004, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_jis2004, + mbfl_filt_conv_jis2004_flush +}; + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.h b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.h new file mode 100644 index 0000000000..ce4b60aacc --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_2004.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_ja.h + * by rui hirokawa <hirokawa@php.net> on 15 aug 2011. + * + */ + +#ifndef MBFL_MBFILTER_EUC_JP_2004_H +#define MBFL_MBFILTER_EUC_JP_2004_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_eucjp2004; +extern const struct mbfl_identify_vtbl vtbl_identify_eucjp2004; +extern const struct mbfl_convert_vtbl vtbl_eucjp2004_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_eucjp2004; + +int mbfl_filt_conv_eucjp2004_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_eucjp2004(int c, mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_EUC_JP_2004_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c new file mode 100644 index 0000000000..f6f12be449 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -0,0 +1,473 @@ +/* + * "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_cp936.c + * by rui hirokawa <hirokawa@php.net> on 11 Aug 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_gb18030.h" + +#include "unicode_table_cp936.h" +#include "unicode_table_gb18030.h" + +static int mbfl_filt_ident_gb18030(int c, mbfl_identify_filter *filter); + +static const char *mbfl_encoding_gb18030_aliases[] = {"gb-18030", "gb-18030-2000", NULL}; + +const mbfl_encoding mbfl_encoding_gb18030 = { + mbfl_no_encoding_gb18030, + "GB18030", + "GB18030", + (const char *(*)[])&mbfl_encoding_gb18030_aliases, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const struct mbfl_identify_vtbl vtbl_identify_gb18030 = { + mbfl_no_encoding_gb18030, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_gb18030 +}; + +const struct mbfl_convert_vtbl vtbl_gb18030_wchar = { + mbfl_no_encoding_gb18030, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_gb18030_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_gb18030 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_gb18030, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_gb18030, + mbfl_filt_conv_common_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + + +int +mbfl_bisec_srch(int w, const unsigned short *tbl, int n) +{ + int k, k1 = 0, k2 = n-1; + + while (k1 < k2) { + k = (k1+k2) >> 1; + if (w <= tbl[2*k+1]) { + k2 = k; + } else if (w >= tbl[2*k+2]) { + k1 = k + 1; + } else { + return -1; + } + } + return k1; +} + +int +mbfl_bisec_srch2(int w, const unsigned short tbl[], int n) +{ + int k, k1 = 0, k2 = n; + + if (w == tbl[0]) { + return 0; + } + + while (k2 - k1 > 1) { + k = (k1 + k2) >> 1; + if (w < tbl[k]) { + k2 = k; + } else if (w > tbl[k]) { + k1 = k; + } else { + return k; + } + } + return -1; +} + +/* + * GB18030 => wchar + */ +int +mbfl_filt_conv_gb18030_wchar(int c, mbfl_convert_filter *filter) +{ + int k; + int c1, c2, c3, w = -1; + + switch (filter->status) { + case 0: + if (c >= 0 && c < 0x80) { /* latin */ + CK((*filter->output_function)(c, filter->data)); + } else if (c == 0x80) { /* euro sign */ + CK((*filter->output_function)(0x20ac, filter->data)); + } else if (c == 0xff) { + CK((*filter->output_function)(0x00ff, filter->data)); + } else if (c > 0x80 && c < 0xff) { /* dbcs/qbcs lead byte */ + filter->status = 1; + filter->cache = c; + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + case 1: /* dbcs/qbcs second byte */ + c1 = filter->cache; + filter->status = 0; + + if (c1 >= 0x81 && c1 <= 0x84 && c >= 0x30 && c <= 0x39) { /* 4 byte range: Unicode BMP */ + filter->status = 2; + filter->cache = (c1 << 8) | c; + return c; + } else if (c1 >= 0x90 && c1 <= 0xe3 && c >= 0x30 && c <= 0x39) { + /* 4 byte range: Unicode 16 planes */ + filter->status = 2; + filter->cache = (c1 << 8) | c; + return c; + } else if (((c1 >= 0xaa && c1 <= 0xaf) || (c1 >= 0xf8 && c1 <= 0xfe)) && + (c >= 0xa1 && c <= 0xfe)) { /* UDA part1,2: U+E000-U+E4C5 */ + w = 94*(c1 >= 0xf8 ? c1 - 0xf2 : c1 - 0xaa) + (c - 0xa1) + 0xe000; + CK((*filter->output_function)(w, filter->data)); + } else if (c1 >= 0xa1 && c1 <= 0xa7 && c >= 0x40 && c < 0xa1 && c != 0x7f) { + /* UDA part3 : U+E4C6-U+E765*/ + w = 96*(c1 - 0xa1) + c - (c >= 0x80 ? 0x41 : 0x40) + 0xe4c6; + CK((*filter->output_function)(w, filter->data)); + } + + c2 = (c1 << 8) | c; + + if (w <= 0 && + ((c2 >= 0xa2ab && c2 <= 0xa9f0 + (0xe80f-0xe801)) || + (c2 >= 0xd7fa && c2 <= 0xd7fa + (0xe814-0xe810)) || + (c2 >= 0xfe50 && c2 <= 0xfe80 + (0xe864-0xe844)))) { + for (k = 0; k < mbfl_gb18030_pua_tbl_max; k++) { + if (c2 >= mbfl_gb18030_pua_tbl[k][2] && + c2 <= mbfl_gb18030_pua_tbl[k][2] + mbfl_gb18030_pua_tbl[k][1] + - mbfl_gb18030_pua_tbl[k][0]) { + w = c2 - mbfl_gb18030_pua_tbl[k][2] + mbfl_gb18030_pua_tbl[k][0]; + CK((*filter->output_function)(w, filter->data)); + break; + } + } + } + + if (w <= 0) { + if ((c1 >= 0xa1 && c1 <= 0xa9 && c >= 0xa1 && c <= 0xfe) || + (c1 >= 0xb0 && c1 <= 0xf7 && c >= 0xa1 && c <= 0xfe) || + (c1 >= 0x81 && c1 <= 0xa0 && c >= 0x40 && c <= 0xfe && c != 0x7f) || + (c1 >= 0xaa && c1 <= 0xfe && c >= 0x40 && c <= 0xa0 && c != 0x7f) || + (c1 >= 0xa8 && c1 <= 0xa9 && c >= 0x40 && c <= 0xa0 && c != 0x7f)) { + w = (c1 - 0x81)*192 + (c - 0x40); + if (w >= 0 && w < cp936_ucs_table_size) { + w = cp936_ucs_table[w]; + } else { + w = 0; + } + if (w <= 0) { + w = (c1 << 8) | c; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_GB18030; + } + CK((*filter->output_function)(w, filter->data)); + } 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; + case 2: /* qbcs third byte */ + c1 = (filter->cache >> 8) & 0xff; + c2 = filter->cache & 0xff; + filter->status = 0; + filter->cache = 0; + if (((c1 >= 0x81 && c1 <= 0x84) || (c1 >= 0x90 && c1 <= 0xe3)) && + c2 >= 0x30 && c2 <= 0x39 && c >= 0x81 && c <= 0xfe) { + filter->cache = (c1 << 16) | (c2 << 8) | c; + filter->status = 3; + } else { + w = (c1 << 16) | (c2 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + case 3: /* qbcs fourth byte */ + c1 = (filter->cache >> 16) & 0xff; + c2 = (filter->cache >> 8) & 0xff; + c3 = filter->cache & 0xff; + filter->status = 0; + filter->cache = 0; + if (((c1 >= 0x81 && c1 <= 0x84) || (c1 >= 0x90 && c1 <= 0xe3)) && + c2 >= 0x30 && c2 <= 0x39 && c3 >= 0x81 && c3 <= 0xfe && c >= 0x30 && c <= 0x39) { + if (c1 >= 0x90 && c1 <= 0xe3) { + w = ((c1 - 0x90)*10 + (c2 - 0x30)*126 + (c3 - 0x81))*10 + (c - 0x30) + 0x10000; + } else { /* Unicode BMP */ + w = (((c1 - 0x81)*10 + (c2 - 0x30))*126 + (c3 - 0x81))*10 + (c - 0x30); + if (w >= 0 && w <= 39419) { + k = mbfl_bisec_srch(w, mbfl_gb2uni_tbl, mbfl_gb_uni_max); + if (k<0) { + /* error */ + w = (c1 << 24) | (c2 << 16) | (c3 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + return c; + } + w += mbfl_gb_uni_ofst[k]; + } else { + w = (c1 << 24) | (c2 << 16) | (c3 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + return c; + } + } + CK((*filter->output_function)(w, filter->data)); + } else { + w = (c1 << 24) | (c2 << 16) | (c3 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +/* + * wchar => GB18030 + */ +int +mbfl_filt_conv_wchar_gb18030(int c, mbfl_convert_filter *filter) +{ + int k, k1, k2; + int c1, s = 0, s1 = 0; + + if (c >= ucs_a1_cp936_table_min && c < ucs_a1_cp936_table_max) { + s = ucs_a1_cp936_table[c - ucs_a1_cp936_table_min]; + } else if (c >= ucs_a2_cp936_table_min && c < ucs_a2_cp936_table_max) { + s = ucs_a2_cp936_table[c - ucs_a2_cp936_table_min]; + } else if (c >= ucs_a3_cp936_table_min && c < ucs_a3_cp936_table_max) { + s = ucs_a3_cp936_table[c - ucs_a3_cp936_table_min]; + } else if (c >= ucs_i_cp936_table_min && c < ucs_i_cp936_table_max) { + s = ucs_i_cp936_table[c - ucs_i_cp936_table_min]; + } else if (c >= ucs_ci_cp936_table_min && c < ucs_ci_cp936_table_max) { + /* U+F900-FA2F CJK Compatibility Ideographs */ + if (c == 0xf92c) { + s = 0xfd9c; + } else if (c == 0xf979) { + s = 0xfd9d; + } else if (c == 0xf995) { + s = 0xfd9e; + } else if (c == 0xf9e7) { + s = 0xfd9f; + } else if (c == 0xf9f1) { + s = 0xfda0; + } else if (c >= 0xfa0c && c <= 0xfa29) { + s = ucs_ci_s_cp936_table[c - 0xfa0c]; + } + } else if (c >= ucs_cf_cp936_table_min && c < ucs_cf_cp936_table_max) { + /* FE30h CJK Compatibility Forms */ + s = ucs_cf_cp936_table[c - ucs_cf_cp936_table_min]; + } else if (c >= ucs_sfv_cp936_table_min && c < ucs_sfv_cp936_table_max) { + /* U+FE50-FE6F Small Form Variants */ + s = ucs_sfv_cp936_table[c - ucs_sfv_cp936_table_min]; + } else if (c >= ucs_hff_cp936_table_min && c < ucs_hff_cp936_table_max) { + /* U+FF00-FFFF HW/FW Forms */ + if (c == 0xff04) { + s = 0xa1e7; + } else if (c == 0xff5e) { + s = 0xa1ab; + } else if (c >= 0xff01 && c <= 0xff5d) { + s = c - 0xff01 + 0xa3a1; + } else if (c >= 0xffe0 && c <= 0xffe5) { + s = ucs_hff_s_cp936_table[c-0xffe0]; + } + } + + if (c == 0x20ac) { /* euro-sign */ + s = 0xa2e3; + } + + if (s <= 0 && c >= mbfl_gb18030_c_tbl_key[0] && + c <= mbfl_gb18030_c_tbl_key[mbfl_gb18030_c_tbl_max-1]) { + k1 = mbfl_bisec_srch2(c, mbfl_gb18030_c_tbl_key, mbfl_gb18030_c_tbl_max); + if (k1 >= 0) { + s = mbfl_gb18030_c_tbl_val[k1]; + } + } + + if (c >= 0xe000 && c <= 0xe864) { /* PUA */ + if (c < 0xe766) { + if (c < 0xe4c6) { + c1 = c - 0xe000; + s = (c1 % 94) + 0xa1; c1 /= 94; + s |= (c1 < 0x06 ? c1 + 0xaa : c1 + 0xf2) << 8; + } else { + c1 = c - 0xe4c6; + s = ((c1 / 96) + 0xa1) << 8; c1 %= 96; + s |= c1 + (c1 >= 0x3f ? 0x41 : 0x40); + } + } else { + /* U+E766..U+E864 */ + k1 = 0; k2 = mbfl_gb18030_pua_tbl_max; + while (k1 < k2) { + k = (k1 + k2) >> 1; + if (c < mbfl_gb18030_pua_tbl[k][0]) { + k2 = k; + } else if (c > mbfl_gb18030_pua_tbl[k][1]) { + k1 = k + 1; + } else { + s = c - mbfl_gb18030_pua_tbl[k][0] + mbfl_gb18030_pua_tbl[k][2]; + break; + } + } + } + } + + if (s <= 0 && c >= 0x0080 && c <= 0xffff) { /* BMP */ + s = mbfl_bisec_srch(c, mbfl_uni2gb_tbl, mbfl_gb_uni_max); + if (s >= 0) { + c1 = c - mbfl_gb_uni_ofst[s]; + s = (c1 % 10) + 0x30; c1 /= 10; + s |= ((c1 % 126) + 0x81) << 8; c1 /= 126; + s |= ((c1 % 10) + 0x30) << 16; c1 /= 10; + s1 = c1 + 0x81; + } + } else if (c >= 0x10000 && c <= 0x10ffff) { /* Code set 3: Unicode U+10000..U+10FFFF */ + c1 = c - 0x10000; + s = (c1 % 10) + 0x30; c1 /= 10; + s |= ((c1 % 126) + 0x81) << 8; c1 /= 126; + s |= ((c1 % 10) + 0x30) << 16; c1 /= 10; + s1 = c1 + 0x90; + } + + if (s <= 0) { + c1 = c & ~MBFL_WCSPLANE_MASK; + if (c1 == MBFL_WCSPLANE_WINCP936) { + s = c & MBFL_WCSPLANE_MASK; + } + if (c == 0) { + s = 0; + } else if (s <= 0) { + s = -1; + } + } + if (s >= 0) { + if (s <= 0x80) { /* latin */ + CK((*filter->output_function)(s, filter->data)); + } else if (s1 > 0) { /* qbcs */ + CK((*filter->output_function)(s1 & 0xff, filter->data)); + CK((*filter->output_function)((s >> 16) & 0xff, filter->data)); + CK((*filter->output_function)((s >> 8) & 0xff, filter->data)); + CK((*filter->output_function)(s & 0xff, filter->data)); + } else { /* dbcs */ + CK((*filter->output_function)((s >> 8) & 0xff, filter->data)); + CK((*filter->output_function)(s & 0xff, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} + +static int mbfl_filt_ident_gb18030(int c, mbfl_identify_filter *filter) +{ + int c1; + + c1 = (filter->status >> 8) & 0xff; + filter->status &= 0xff; + + if (filter->status == 0) { + if (c <= 0x80 || c == 0xff) { + filter->status = 0; + } else { + filter->status = 1; + filter->status |= (c << 8); + } + } else if (filter->status == 1) { /* dbcs/qbcs 2nd byte */ + if (((c1 >= 0x81 && c1 <= 0x84) || (c1 >= 0x90 && c1 <= 0xe3)) && c >= 0x30 && c <= 0x39) { /* qbcs */ + filter->status = 2; + } else if (((c1 >= 0xaa && c1 <= 0xaf) || (c1 >= 0xf8 && c1 <= 0xfe)) && (c >= 0xa1 && c <= 0xfe)) { + filter->status = 0; /* UDA part 1,2 */ + } else if (c1 >= 0xa1 && c1 <= 0xa7 && c >= 0x40 && c < 0xa1 && c != 0x7f) { + filter->status = 0; /* UDA part 3 */ + } else if ((c1 >= 0xa1 && c1 <= 0xa9 && c >= 0xa1 && c <= 0xfe) || + (c1 >= 0xb0 && c1 <= 0xf7 && c >= 0xa1 && c <= 0xfe) || + (c1 >= 0x81 && c1 <= 0xa0 && c >= 0x40 && c <= 0xfe && c != 0x7f) || + (c1 >= 0xaa && c1 <= 0xfe && c >= 0x40 && c <= 0xa0 && c != 0x7f) || + (c1 >= 0xa8 && c1 <= 0xa9 && c >= 0x40 && c <= 0xa0 && c != 0x7f)) { + filter->status = 0; /* DBCS */ + } else { + filter->flag = 1; /* bad */ + filter->status = 0; + } + } else if (filter->status == 2) { /* qbcs 3rd byte */ + if (c > 0x80 && c < 0xff) { + filter->status = 3; + } else { + filter->flag = 1; /* bad */ + filter->status = 0; + } + } else if (filter->status == 3) { /* qbcs 4th byte */ + if (c >= 0x30 && c < 0x40) { + filter->status = 0; + } else { + filter->flag = 1; /* bad */ + filter->status = 0; + } + } else { /* bad */ + filter->flag = 1; + } + + return c; +} + + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.h b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.h new file mode 100644 index 0000000000..e182a39555 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.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_cn.h + * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. + * + */ + +#ifndef MBFL_MBFILTER_GB18030_H +#define MBFL_MBFILTER_GB18030_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_gb18030; +extern const struct mbfl_identify_vtbl vtbl_identify_gb18030; +extern const struct mbfl_convert_vtbl vtbl_gb18030_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_gb18030; + +int mbfl_filt_conv_gb18030_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_gb18030(int c, mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_GB18030_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index 1fe0e6b732..56c364d867 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -70,7 +70,7 @@ const mbfl_encoding mbfl_encoding_html_ent = { "HTML-ENTITIES", (const char *(*)[])&mbfl_encoding_html_ent_aliases, NULL, - MBFL_ENCTYPE_HTML_ENT + MBFL_ENCTYPE_ENC_STRM | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_convert_vtbl vtbl_wchar_html = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_hz.c b/ext/mbstring/libmbfl/filters/mbfilter_hz.c index 7c7eaffc07..893ad5f740 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_hz.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_hz.c @@ -44,7 +44,7 @@ const mbfl_encoding mbfl_encoding_hz = { "HZ-GB-2312", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_hz = { @@ -165,7 +165,15 @@ mbfl_filt_conv_wchar_hz(int c, mbfl_convert_filter *filter) } else if (c >= ucs_i_cp936_table_min && c < ucs_i_cp936_table_max) { s = ucs_i_cp936_table[c - ucs_i_cp936_table_min]; } else if (c >= ucs_hff_cp936_table_min && c < ucs_hff_cp936_table_max) { - s = ucs_hff_cp936_table[c - ucs_hff_cp936_table_min]; + if (c == 0xff04) { + s = 0xa1e7; + } else if (c == 0xff5e) { + s = 0xa1ab; + } else if (c >= 0xff01 && c <= 0xff5d) { + s = c - 0xff01 + 0xa3a1; + } else if (c >= 0xffe0 && c <= 0xffe5) { + s = ucs_hff_s_cp936_table[c-0xffe0]; + } } if (s & 0x8000) { s -= 0x8080; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c index 1bf77172b6..a7daf2b913 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}; @@ -48,7 +48,7 @@ const mbfl_encoding mbfl_encoding_2022jpms = { "ISO-2022-JP", (const char *(*)[])&mbfl_encoding_2022jpms_aliases, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_2022jpms = { @@ -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_iso2022_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c index 77c95c5ad2..01c01a4477 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c @@ -43,7 +43,7 @@ const mbfl_encoding mbfl_encoding_2022kr = { "ISO-2022-KR", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_2022kr = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c new file mode 100644 index 0000000000..d855374bf0 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.c @@ -0,0 +1,168 @@ +/* + * "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_jis.c + * by rui hirokawa <hirokawa@php.net> on 18 aug 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_iso2022jp_2004.h" +#include "mbfilter_sjis_2004.h" + +#include "unicode_table_jis2004.h" +#include "unicode_table_jis.h" + +extern int mbfl_filt_conv_any_jis_flush(mbfl_convert_filter *filter); +static int mbfl_filt_ident_2022jp_2004(int c, mbfl_identify_filter *filter); + +const mbfl_encoding mbfl_encoding_2022jp_2004 = { + mbfl_no_encoding_2022jp_2004, + "ISO-2022-JP-2004", + "ISO-2022-JP-2004", + NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE +}; + +const struct mbfl_identify_vtbl vtbl_identify_2022jp_2004 = { + mbfl_no_encoding_2022jp_2004, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_2022jp_2004 +}; + +const struct mbfl_convert_vtbl vtbl_2022jp_2004_wchar = { + mbfl_no_encoding_2022jp_2004, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis2004_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_2022jp_2004 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_2022jp_2004, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_jis2004, + mbfl_filt_conv_jis2004_flush +}; + +static int mbfl_filt_ident_2022jp_2004(int c, mbfl_identify_filter *filter) +{ +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x80: X 0212 */ +/* case 0x90: X 0213 plane 1 */ +/* case 0xa0: X 0213 plane 2 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (filter->status == 0x80 && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + ; + } else { + filter->flag = 1; /* bad */ + } + break; + +/* case 0x81: X 0208 second char */ + case 1: + if (c == 0x1b) { + filter->status++; + } else { + filter->status &= ~0xf; + if (c < 0x21 || c > 0x7e) { /* bad */ + filter->flag = 1; + } + } + break; + + /* ESC */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ */ + case 3: + if (c == 0x42) { /* 'B' */ + filter->status = 0x80; + } else if (c == 0x28) { /* '(' */ + filter->status++; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ ( */ + case 4: + if (c == 0x51) { /* JIS X 0213 plane 1 */ + filter->status = 0x90; + } else if (c == 0x50) { /* JIS X 0213 plane 2 */ + filter->status = 0xa0; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC ( */ + case 5: + if (c == 0x42) { /* 'B' */ + filter->status = 0; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.h b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.h new file mode 100644 index 0000000000..f6e56b9b9d --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_2004.h @@ -0,0 +1,44 @@ +/* + * "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_ja.c + * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. + * + */ + +#ifndef MBFL_MBFILTER_2022JP_2004_H +#define MBFL_MBFILTER_2022JP_2004_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_2022jp_2004; +extern const struct mbfl_identify_vtbl vtbl_identify_2022jp_2004; +extern const struct mbfl_convert_vtbl vtbl_2022jp_2004_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_2022jp_2004; + +int mbfl_filt_conv_2022jp_2004_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_2022jp_2004(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_any_2022jp_2004_flush(mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_2022JP_2004_H */ 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 0000000000..4deb02960c --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -0,0 +1,433 @@ +/* + * "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 <hirokawa@php.net> 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); + +static const char *mbfl_encoding_2022jp_kddi_aliases[] = {"ISO-2022-JP-KDDI", NULL}; + +const mbfl_encoding mbfl_encoding_2022jp_kddi = { + mbfl_no_encoding_2022jp_kddi, + "ISO-2022-JP-MOBILE#KDDI", + "ISO-2022-JP", + mbfl_encoding_2022jp_kddi_aliases, + 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, s, w, 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 0000000000..7ae1da2ddc --- /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 <hirokawa@php.net> 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_jis.c b/ext/mbstring/libmbfl/filters/mbfilter_jis.c index 6b1aef3643..7fa1fd35b9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_jis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_jis.c @@ -46,7 +46,7 @@ const mbfl_encoding mbfl_encoding_jis = { "ISO-2022-JP", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const mbfl_encoding mbfl_encoding_2022jp = { @@ -55,7 +55,7 @@ const mbfl_encoding mbfl_encoding_2022jp = { "ISO-2022-JP", NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_jis = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 188d088ed0..df9752bc3b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -43,7 +43,7 @@ const mbfl_encoding mbfl_encoding_qprint = { "Quoted-Printable", (const char *(*)[])&mbfl_encoding_qprint_aliases, NULL, - MBFL_ENCTYPE_SBCS + MBFL_ENCTYPE_ENC_STRM | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_convert_vtbl vtbl_8bit_qprint = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 83ef565927..7c463cd7b1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -34,12 +34,15 @@ #include "mbfilter.h" #include "mbfilter_sjis.h" +#define UNICODE_TABLE_CP932_DEF +#define UNICODE_TABLE_JIS_DEF + #include "unicode_table_cp932_ext.h" #include "unicode_table_jis.h" -static int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter); +int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter); -static const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ +const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -66,7 +69,7 @@ const mbfl_encoding mbfl_encoding_sjis = { "Shift_JIS", (const char *(*)[])&mbfl_encoding_sjis_aliases, mblen_table_sjis, - MBFL_ENCTYPE_MBCS + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_sjis = { @@ -273,7 +276,7 @@ mbfl_filt_conv_wchar_sjis(int c, mbfl_convert_filter *filter) return c; } -static int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter) +int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter) { if (filter->status) { /* kanji second char */ if (c < 0x40 || c > 0xfc || c == 0x7f) { /* bad */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c new file mode 100644 index 0000000000..4e1838f060 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -0,0 +1,725 @@ +/* + * "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_sjis.c + * by rui hirokawa <hirokawa@php.net> on 15 aug 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_sjis_2004.h" + +#include "unicode_table_jis2004.h" +#include "unicode_table_jis.h" + +extern const unsigned char mblen_table_sjis[]; + +static int mbfl_filt_ident_sjis2004(int c, mbfl_identify_filter *filter); + +extern int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter); +extern int mbfl_bisec_srch(int w, const unsigned short *tbl, int n); +extern int mbfl_bisec_srch2(int w, const unsigned short tbl[], int n); + +static const char *mbfl_encoding_sjis2004_aliases[] = {"SJIS2004","Shift_JIS-2004", NULL}; + +const mbfl_encoding mbfl_encoding_sjis2004 = { + mbfl_no_encoding_sjis2004, + "SJIS-2004", + "Shift_JIS", + (const char *(*)[])&mbfl_encoding_sjis2004_aliases, + mblen_table_sjis, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const struct mbfl_identify_vtbl vtbl_identify_sjis2004 = { + mbfl_no_encoding_sjis2004, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_sjis +}; + +const struct mbfl_convert_vtbl vtbl_sjis2004_wchar = { + mbfl_no_encoding_sjis2004, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis2004_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_sjis2004 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_sjis2004, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_jis2004, + mbfl_filt_conv_jis2004_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +#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) + + +/* + * JIS-2004 => wchar + */ +int +mbfl_filt_conv_jis2004_wchar(int c, mbfl_convert_filter *filter) +{ + int k; + int c1, c2, s, s1, s2, w = 0, w1; + +retry: + switch (filter->status & 0xf) { + case 0: + if (c >= 0 && c < 0x80) { /* latin */ + if (filter->from->no_encoding == mbfl_no_encoding_eucjp2004) { + CK((*filter->output_function)(c, filter->data)); + } else if (filter->from->no_encoding == mbfl_no_encoding_sjis2004) { + if (c == 0x5c) { + CK((*filter->output_function)(0x00a5, filter->data)); + } else if (c == 0x7e) { + CK((*filter->output_function)(0x203e, filter->data)); + } else { + CK((*filter->output_function)(c, filter->data)); + } + } else { /* ISO-2022-JP-2004 */ + if (c == 0x1b) { + filter->status += 6; + } else if ((filter->status == 0x80 || filter->status == 0x90 || filter->status == 0xa0) + && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->cache = c; + if (filter->status == 0x90) { + filter->status += 1; /* JIS X 0213 plane 1 */ + } else if (filter->status == 0xa0) { + filter->status += 4; /* JIS X 0213 plane 2 */ + } else { + filter->status += 5; /* JIS X 0208 */ + } + } else { + CK((*filter->output_function)(c, filter->data)); + } + } + } else { + if (filter->from->no_encoding == mbfl_no_encoding_eucjp2004) { + if (c > 0xa0 && c < 0xff) { /* X 0213 plane 1 first char */ + filter->status = 1; + filter->cache = c; + } else if (c == 0x8e) { /* kana first char */ + filter->status = 2; + } else if (c == 0x8f) { /* X 0213 plane 2 first char */ + filter->status = 3; + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + } else if (filter->from->no_encoding == mbfl_no_encoding_sjis2004) { + if (c > 0xa0 && c < 0xe0) { /* kana */ + CK((*filter->output_function)(0xfec0 + c, filter->data)); + } else if (c > 0x80 && c < 0xfd && c != 0xa0) { /* kanji first char */ + filter->status = 1; + filter->cache = c; + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + } + break; + + case 1: /* kanji second char */ + filter->status &= ~0xf; + c1 = filter->cache; + + if (filter->from->no_encoding == mbfl_no_encoding_eucjp2004) { + if (c > 0xa0 && c < 0xff) { + s1 = c1 - 0x80; + s2 = c - 0x80; + } + } else if (filter->from->no_encoding == mbfl_no_encoding_sjis2004) { + if (c >= 0x40 && c <= 0xfc && c != 0x7f) { + SJIS_DECODE(c1, c, s1, s2); + } + } else { + s1 = c1; + s2 = c; + } + w1 = (s1 << 8) | s2; + + if (w1 >= 0x2121) { + /* conversion for combining characters */ + if ((w1 >= 0x2477 && w1 <= 0x2479) || (w1 >= 0x2479 && w1 <= 0x247B) || + (w1 >= 0x2577 && w1 <= 0x257E) || w1 == 0x2678 || w1 == 0x2B44 || + (w1 >= 0x2B48 && w1 <= 0x2B4F) || (w1 >= 0x2B65 && w1 <= 0x2B66)) { + k = mbfl_bisec_srch2(w1, jisx0213_u2_key, jisx0213_u2_tbl_len); + if (k >= 0) { + w = jisx0213_u2_tbl[2*k]; + CK((*filter->output_function)(w, filter->data)); + w = jisx0213_u2_tbl[2*k+1]; + } + } + + /* conversion for BMP */ + if (w <= 0) { + w1 = (s1 - 0x21)*94 + s2 - 0x21; + if (w1 >= 0 && w1 < jisx0213_ucs_table_size) { + w = jisx0213_ucs_table[w1]; + } + } + + /* conversion for CJK Unified Ideographs ext.B (U+2XXXX) */ + if (w <= 0) { + w1 = (s1 << 8) | s2; + k = mbfl_bisec_srch2(w1, jisx0213_jis_u5_key, jisx0213_u5_tbl_len); + if (k >= 0) { + w = jisx0213_jis_u5_tbl[k] + 0x20000; + } + } + + if (w <= 0) { + if (s1 < 0x7f && s2 < 0x7f) { + w = (s1 << 8) | s2; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0213; + } else { + w = (c1 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + } + } + CK((*filter->output_function)(w, filter->data)); + } 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; + + case 2: /* got 0x8e : EUC-JP-2004 kana */ + filter->status = 0; + if (c > 0xa0 && c < 0xe0) { + w = 0xfec0 + c; + CK((*filter->output_function)(w, filter->data)); + } else if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else { + w = 0x8e00 | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + case 3: /* X 0213 plane 2 first char : EUC-JP-2004 (0x8f), ISO-2022-JP-2004 */ + if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + filter->status = 0; + } else { + if (filter->from->no_encoding == mbfl_no_encoding_eucjp2004) { + s1 = c - 0x80; + } else { + s1 = c; + } + if (s1 > 0x20 && s1 < 0x80) { + filter->cache = s1; + filter->status++; + } else { + if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + w = c | 0x8f00; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + } else { + w = c & 0x7f; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0213; + } + CK((*filter->output_function)(w, filter->data)); + } + } + break; + + case 4: /* X 0213 plane 2 second char : EUC-JP-2004, ISO-2022-JP-2004 */ + + filter->status &= ~0xf; + c1 = filter->cache; + if (filter->from->no_encoding == mbfl_no_encoding_eucjp2004) { + c2 = c - 0x80; + } else { + c2 = c; + } + s1 = c1 - 0x21; + s2 = c2 - 0x21; + + if (((s1 >= 0 && s1 <= 4 && s1 != 1) || s1 == 7 || (s1 >= 11 && s1 <= 14) || + (s1 >= 77 && s1 < 94)) && s2 >= 0 && s2 < 94) { + /* calc offset from ku */ + for (k = 0; k < jisx0213_p2_ofst_len; k++) { + if (s1 == jisx0213_p2_ofst[k]-1) { + break; + } + } + k = k - (jisx0213_p2_ofst[k]-1); + + /* check for japanese chars in BMP */ + s = (s1 + 94 + k)*94 + s2; + if (s >= 0 && s < jisx0213_ucs_table_size) { + w = jisx0213_ucs_table[s]; + } else { + w = 0; + } + + /* check for japanese chars in CJK Unified Ideographs ext.B (U+2XXXX) */ + if (w <= 0) { + w1 = ((c1 + k + 94) << 8) | c2; + k = mbfl_bisec_srch2(w1, jisx0213_jis_u5_key, jisx0213_u5_tbl_len); + if (k >= 0) { + w = jisx0213_jis_u5_tbl[k] + 0x20000; + } + } + + if (w <= 0) { + w = ((c1 & 0x7f) << 8) | (c2 & 0x7f); + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0213; + } + + CK((*filter->output_function)(w, filter->data)); + } else if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else { + if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + w = (c1 << 8) | c | 0x8f0000; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + } else { + w = ((c1 & 0x7f) << 8) | (c2 & 0x7f); + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0213; + } + CK((*filter->output_function)(w, filter->data)); + } + + break; + + case 5: /* X 0208 : ISO-2022-JP-2004 */ + filter->status &= ~0xf; + c1 = filter->cache; + if (c > 0x20 && c < 0x7f) { + s = (c1 - 0x21)*94 + c - 0x21; + if (s >= 0 && s < jisx0208_ucs_table_size) { + w = jisx0208_ucs_table[s]; + } + } + if (w <= 0) { + w = (c1 << 8) | c; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0208; + } + CK((*filter->output_function)(w, filter->data)); + break; + + /* ESC : ISO-2022-JP-2004 */ +/* case 0x06: */ +/* case 0x16: */ +/* case 0x26: */ +/* case 0x86: */ +/* case 0x96: */ +/* case 0xa6: */ + case 6: + 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 $ : ISO-2022-JP-2004 */ +/* case 0x07: */ +/* case 0x17: */ +/* case 0x27: */ +/* case 0x87: */ +/* case 0x97: */ +/* case 0xa7: */ + case 7: + if (c == 0x42) { /* 'B' -> JIS X 0208-1983 */ + 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; + + break; + + /* ESC $ ( : ISO-2022-JP-2004 */ +/* case 0x08: */ +/* case 0x18: */ +/* case 0x28: */ +/* case 0x88: */ +/* case 0x98: */ +/* case 0xa8: */ + case 8: + if (c == 0x51) { /* JIS X 0213 plane 1 */ + filter->status = 0x90; + } else if (c == 0x50) { /* JIS X 0213 plane 2 */ + filter->status = 0xa0; + } 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 ( : ISO-2022-JP-2004 */ +/* case 0x09: */ +/* case 0x19: */ +/* case 0x29: */ +/* case 0x89: */ +/* case 0x99: */ + case 9: + if (c == 0x42) { /* 'B' : ASCII */ + filter->status = 0; + } 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; +} + +int +mbfl_filt_conv_wchar_jis2004(int c, mbfl_convert_filter *filter) { + int k; + int c1, c2, s1 = 0, s2; + +retry: + + /* check for 1st char of combining characters */ + if ((filter->status & 0xf)== 0 && ( + c == 0x00E6 || + (c >= 0x0254 && c <= 0x02E9) || + (c >= 0x304B && c <= 0x3053) || + (c >= 0x30AB && c <= 0x30C8) || + c == 0x31F7)) { + for (k=0;k<jisx0213_u2_tbl_len;k++) { + if (c == jisx0213_u2_tbl[2*k]) { + filter->status++; + filter->cache = k; + return c; + } + } + } + + /* check for 2nd char of combining characters */ + if ((filter->status & 0xf) == 1 && + filter->cache >= 0 && filter->cache <= jisx0213_u2_tbl_len) { + k = filter->cache; + filter->status &= ~0xf; + filter->cache = 0; + + c1 = jisx0213_u2_tbl[2*k]; + if ((c1 == 0x0254 || c1 == 0x028C || c1 == 0x0259 || c1 == 0x025A) + && c == 0x0301) { + k++; + } + if (c == jisx0213_u2_tbl[2*k+1]) { + s1 = jisx0213_u2_key[k]; + } else { /* fallback */ + s1 = jisx0213_u2_fb_tbl[k]; + + if (filter->to->no_encoding == mbfl_no_encoding_sjis2004) { + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + } else if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + s2 = (s1 & 0xff) + 0x80; + s1 = ((s1 >> 8) & 0xff) + 0x80; + } else { + if (filter->status != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x24, filter->data)); + CK((*filter->output_function)(0x28, filter->data)); + CK((*filter->output_function)(0x51, filter->data)); + } + filter->status = 0x200; + + s2 = s1 & 0x7f; + s1 = (s1 >> 8) & 0x7f; + } + + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + goto retry; + } + } + + /* check for major japanese chars: U+4E00 - U+9FFF */ + if (s1 <= 0) { + for (k=0; k < uni2jis_tbl_len ;k++) { + if (c >= uni2jis_tbl_range[k][0] && c <= uni2jis_tbl_range[k][1]) { + s1 = uni2jis_tbl[k][c-uni2jis_tbl_range[k][0]]; + break; + } + } + } + + /* check for japanese chars in compressed mapping area: U+1E00 - U+4DBF */ + if (s1 <= 0 && c >= ucs_c1_jisx0213_min && c <= ucs_c1_jisx0213_max) { + k = mbfl_bisec_srch(c, ucs_c1_jisx0213_tbl, ucs_c1_jisx0213_tbl_len); + if (k >= 0) { + s1 = ucs_c1_jisx0213_ofst[k] + c - ucs_c1_jisx0213_tbl[2*k]; + } + } + + /* check for japanese chars in CJK Unified Ideographs ext.B (U+2XXXX) */ + if (s1 <= 0 && c >= jisx0213_u5_tbl_min && c <= jisx0213_u5_tbl_max) { + k = mbfl_bisec_srch2(c - 0x20000, jisx0213_u5_jis_key, jisx0213_u5_tbl_len); + if (k >= 0) { + s1 = jisx0213_u5_jis_tbl[k]; + } + } + + if (s1 <= 0) { + /* CJK Compatibility Forms: U+FE30 - U+FE4F */ + if (c == 0xfe45) { + s1 = 0x233e; + } else if (c == 0xfe46) { + s1 = 0x233d; + } else if (c >= 0xf91d && c <= 0xf9dc) { + /* CJK Compatibility Ideographs: U+F900 - U+F92A */ + k = mbfl_bisec_srch2(c, ucs_r2b_jisx0213_cmap_key, ucs_r2b_jisx0213_cmap_len); + if (k >= 0) { + s1 = ucs_r2b_jisx0213_cmap_val[k]; + } + } + } + + if (s1 <= 0) { + c1 = c & ~MBFL_WCSPLANE_MASK; + if (c1 == MBFL_WCSPLANE_JIS0213) { + s1 = c & MBFL_WCSPLANE_MASK; + } + if (c == 0) { + s1 = 0; + } else if (s1 <= 0) { + s1 = -1; + } + } else if (s1 >= 0x9980) { + s1 = -1; + } + + if (s1 >= 0) { + if (s1 < 0x80) { /* ASCII */ + if (filter->to->no_encoding == mbfl_no_encoding_2022jp_2004 && + (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' */ + } + filter->status = 0; + CK((*filter->output_function)(s1, filter->data)); + } else if (s1 < 0x100) { /* latin or kana */ + if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + CK((*filter->output_function)(0x8e, filter->data)); + } + CK((*filter->output_function)(s1, filter->data)); + } else if (s1 < 0x7f00) { /* X 0213 plane 1 */ + if (filter->to->no_encoding == mbfl_no_encoding_sjis2004) { + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + } else if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + s2 = (s1 & 0xff) + 0x80; + s1 = ((s1 >> 8) & 0xff) + 0x80; + } else { + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x51, filter->data)); /* 'Q' */ + } + filter->status = 0x200; + s2 = s1 & 0xff; + s1 = (s1 >> 8) & 0xff; + } + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } else { /* X 0213 plane 2 */ + if (filter->to->no_encoding == mbfl_no_encoding_sjis2004) { + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + } else { + s2 = s1 & 0xff; + k = ((s1 >> 8) & 0xff) - 0x7f; + if (k >= 0 && k < jisx0213_p2_ofst_len) { + s1 = jisx0213_p2_ofst[k] - 1 + 0x21; + } + if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + s2 |= 0x80; + s1 |= 0x80; + CK((*filter->output_function)(0x8f, filter->data)); + } else { + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x50, filter->data)); /* 'P' */ + } + filter->status = 0x200; + } + } + + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } +} + +int +mbfl_filt_conv_jis2004_flush(mbfl_convert_filter *filter) +{ + int k, c1, c2, s1, s2; + + k = filter->cache; + filter->cache = 0; + + if (filter->status == 1 && k >= 0 && k <= jisx0213_u2_tbl_len) { + s1 = jisx0213_u2_fb_tbl[k]; + + if (filter->to->no_encoding == mbfl_no_encoding_sjis2004) { + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + } else if (filter->to->no_encoding == mbfl_no_encoding_eucjp2004) { + s2 = (s1 & 0xff) | 0x80; + s1 = ((s1 >> 8) & 0xff) | 0x80; + } else { + s2 = s1 & 0x7f; + s1 = (s1 >> 8) & 0x7f; + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x51, filter->data)); /* 'Q' */ + } + filter->status = 0x200; + } + + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + + /* back to 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' */ + } + + filter->status = 0; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + + return 0; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.h b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.h new file mode 100644 index 0000000000..cf91f7a06b --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.h @@ -0,0 +1,49 @@ +/* + * "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_sjis.c + * by rui hirokawa <hirokawa@php.net> on 15 aug 2011. + * + */ + +#ifndef MBFL_MBFILTER_SJIS_2004_H +#define MBFL_MBFILTER_SJIS_2004_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_sjis2004; +extern const struct mbfl_identify_vtbl vtbl_identify_sjis2004; +extern const struct mbfl_convert_vtbl vtbl_sjis2004_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_sjis2004; + +int mbfl_filt_conv_jis2004_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_jis2004(int c, mbfl_convert_filter *filter); + +int mbfl_filt_conv_jis2004_flush(mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_SJIS_2004_H */ + +/* + * charset=UTF-8 + */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c new file mode 100644 index 0000000000..2f84edff21 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c @@ -0,0 +1,700 @@ +/* + * "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_sjis_open.c + * by Rui Hirokawa <hirokawa@php.net> on 25 July 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_sjis_mac.h" + +#include "unicode_table_cp932_ext.h" +#include "unicode_table_jis.h" + +#include "sjis_mac2uni.h" + +extern int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter); +extern const unsigned char mblen_table_sjis[]; + +static int mbfl_filt_conv_sjis_mac_flush(mbfl_convert_filter *filter); + +static const char *mbfl_encoding_sjis_mac_aliases[] = {"MacJapanese", "x-Mac-Japanese", NULL}; + +const mbfl_encoding mbfl_encoding_sjis_mac = { + mbfl_no_encoding_sjis_mac, + "SJIS-mac", + "Shift_JIS", + (const char *(*)[])&mbfl_encoding_sjis_mac_aliases, + mblen_table_sjis, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const struct mbfl_identify_vtbl vtbl_identify_sjis_mac = { + mbfl_no_encoding_sjis_mac, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_sjis +}; + +const struct mbfl_convert_vtbl vtbl_sjis_mac_wchar = { + mbfl_no_encoding_sjis_mac, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_sjis_mac_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_sjis_mac = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_sjis_mac, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_sjis_mac, + mbfl_filt_conv_sjis_mac_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +#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) + +/* + * SJIS-mac => wchar + */ +int +mbfl_filt_conv_sjis_mac_wchar(int c, mbfl_convert_filter *filter) +{ + int i, j, n; + int c1, s, s1, s2, w; + + switch (filter->status) { + case 0: + if (c >= 0 && c < 0x80 && c != 0x5c) { /* latin */ + CK((*filter->output_function)(c, filter->data)); + } else if (c > 0xa0 && c < 0xe0) { /* kana */ + CK((*filter->output_function)(0xfec0 + c, filter->data)); + } else if (c > 0x80 && c < 0xfd && c != 0xa0) { /* kanji first char */ + filter->status = 1; + filter->cache = c; + } else if (c == 0x5c) { + CK((*filter->output_function)(0x00a5, filter->data)); + } else if (c == 0x80) { + CK((*filter->output_function)(0x005c, filter->data)); + } else if (c == 0xa0) { + CK((*filter->output_function)(0x00a0, filter->data)); + } else if (c == 0xfd) { + CK((*filter->output_function)(0x00a9, filter->data)); + } else if (c == 0xfe) { + CK((*filter->output_function)(0x2122, filter->data)); + } else if (c == 0xff) { + CK((*filter->output_function)(0x2026, filter->data)); + CK((*filter->output_function)(0xf87f, filter->data)); + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + case 1: /* kanji second char */ + filter->status = 0; + c1 = filter->cache; + if (c >= 0x40 && c <= 0xfc && c != 0x7f) { + w = 0; + SJIS_DECODE(c1, c, s1, s2); + s = (s1 - 0x21)*94 + s2 - 0x21; + if (s <= 0x89) { + if (s == 0x1c) { + w = 0x2014; /* EM DASH */ + } else if (s == 0x1f) { + w = 0xff3c; /* FULLWIDTH REVERSE SOLIDUS */ + } else if (s == 0x20) { + w = 0x301c; /* FULLWIDTH TILDE */ + } else if (s == 0x21) { + w = 0x2016; /* PARALLEL TO */ + } else if (s == 0x3c) { + w = 0x2212; /* FULLWIDTH HYPHEN-MINUS */ + } else if (s == 0x50) { + w = 0x00a2; /* FULLWIDTH CENT SIGN */ + } else if (s == 0x51) { + w = 0x00a3; /* FULLWIDTH POUND SIGN */ + } else if (s == 0x89) { + w = 0x00ac; /* FULLWIDTH NOT SIGN */ + } + } + + /* apple gaiji area 0x8540 - 0x886d */ + if (w == 0) { + for (i=0; i<7; i++) { + if (s >= code_tbl[i][0] && s <= code_tbl[i][1]) { + w = s - code_tbl[i][0] + code_tbl[i][2]; + break; + } + } + } + + if (w == 0) { + + for (i=0; i<code_tbl_m_len; i++) { + if (s == code_tbl_m[i][0]) { + if (code_tbl_m[i][1] == 0xf860) { + n = 4; + } else if (code_tbl_m[i][1] == 0xf861) { + n = 5; + } else { + n = 6; + } + for (j=1; j<n-1; j++) { + CK((*filter->output_function)(code_tbl_m[i][j], filter->data)); + } + w = code_tbl_m[i][n-1]; + break; + } + } + } + + if (w == 0) { + for (i=0; i<8; i++) { + if (s >= code_ofst_tbl[i][0] && s <= code_ofst_tbl[i][1]) { + w = code_map[i][s - code_ofst_tbl[i][0]]; + s2 = 0; + if (s >= 0x043e && s <= 0x0441) { + s2 = 0xf87a; + } else if (s == 0x03b1 || s == 0x03b7) { + s2 = 0xf87f; + } else if (s == 0x04b8 || s == 0x04b9 || s == 0x04c4) { + s2 = 0x20dd; + } else if (s == 0x1ed9 || s == 0x1eda || s == 0x1ee8 || s == 0x1ef3 || + (s >= 0x1ef5 && s <= 0x1efb) || s == 0x1f05 || s == 0x1f06 || + s == 0x1f18 || (s >= 0x1ff2 && s <= 0x20a5)) { + s2 = 0xf87e; + } + if (s2 > 0) { + CK((*filter->output_function)(w, filter->data)); + w = s2; + } + break; + } + } + } + + if (w == 0 && s >= 0 && s < jisx0208_ucs_table_size) { /* X 0208 */ + w = jisx0208_ucs_table[s]; + } + + if (w <= 0) { + w = (s1 << 8) | s2; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_WINCP932; + } + CK((*filter->output_function)(w, filter->data)); + } 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; + + default: + filter->status = 0; + break; + } + + return c; +} + +/* + * wchar => SJIS-mac + */ +int +mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter) +{ + int i; + int c1, c2, s1, s2, mode; + + s1 = 0; + s2 = 0; + + // a1: U+0000 -> U+046F + // a2: U+2000 -> U+30FF + // i: U+4E00 -> U+9FFF + // r: U+FF00 -> U+FFFF + + switch (filter->status) { + + case 1: + c1 = filter->cache; + filter->cache = 0; + filter->status = 0; + + s1 = 0; + s2 = 0; + + if (c == 0xf87a) { + for (i=0;i<4;i++) { + if (c1 == s_form_tbl[i+34+3+3]) { + s1 = s_form_sjis_tbl[i+34+3+3]; + break; + } + } + if (s1 <= 0) { + s2 = c1; + } + } else if (c == 0x20dd) { + for (i=0;i<3;i++) { + if (c1 == s_form_tbl[i+34+3]) { + s1 = s_form_sjis_tbl[i+34+3]; + break; + } + } + if (s1 <= 0) { + s2 = c1; + } + } else if (c == 0xf87f) { + for (i=0;i<3;i++) { + if (c1 == s_form_tbl[i+34]) { + s1 = s_form_sjis_tbl[i+34]; + break; + } + } + if (s1 <= 0) { + s2 = c1; s1 = -1; + } + } else if (c == 0xf87e) { + for (i=0;i<34;i++) { + if (c1 == s_form_tbl[i]) { + s1 = s_form_sjis_tbl[i]; + break; + } + } + if (s1 <= 0) { + s2 = c1; s1 = -1; + } + } else { + s2 = c1; + s1 = c; + } + + if (s2 > 0) { + for (i=0;i<s_form_tbl_len;i++) { + if (c1 == s_form_tbl[i]) { + s1 = s_form_sjis_fallback_tbl[i]; + break; + } + } + } + + if (s1 >= 0) { + if (s1 < 0x100) { + CK((*filter->output_function)(s1, filter->data)); + } else { + CK((*filter->output_function)((s1 >> 8) & 0xff, filter->data)); + CK((*filter->output_function)(s1 & 0xff, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + if (s2 <= 0 || s1 == -1) { + break; + } + + case 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]; + if (c == 0x5c) { + s1 = 0x80; + } else if (c == 0xa9) { + s1 = 0xfd; + } + } 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]; + if (c == 0x2122) { + s1 = 0xfe; + } else if (c == 0x2014) { + s1 = 0x213d; + } else if (c == 0x2116) { + s1 = 0x2c1d; + } + } 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]; + } + + if (c >= 0x2000) { + for (i=0;i<s_form_tbl_len;i++) { + if (c == s_form_tbl[i]) { + filter->status = 1; + filter->cache = c; + return c; + } + } + + if (c == 0xf860 || c == 0xf861 || c == 0xf862) { + filter->status = 2; + filter->cache = c; + return c; + } + } + + 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 == 0xa0) { + s1 = 0x00a0; + } else if (c == 0xa5) { /* YEN SIGN */ + s1 = 0x216f; /* FULLWIDTH YEN SIGN */ + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s1 = 0x2140; + } + } + + if (s1 <= 0) { + for (i=0; i<wchar2sjis_mac_r_tbl_len; i++) { + if (c >= wchar2sjis_mac_r_tbl[i][0] && c <= wchar2sjis_mac_r_tbl[i][1]) { + s1 = c - wchar2sjis_mac_r_tbl[i][0] + wchar2sjis_mac_r_tbl[i][2]; + break; + } + } + + if (s1 <= 0) { + for (i=0; i<wchar2sjis_mac_r_map_len; i++) { + if (c >= wchar2sjis_mac_r_map[i][0] && c <= wchar2sjis_mac_r_map[i][1]) { + s1 = wchar2sjis_mac_code_map[i][c-wchar2sjis_mac_r_map[i][0]]; + break; + } + } + } + + if (s1 <= 0) { + for (i=0; i<wchar2sjis_mac_wchar_tbl_len ; i++) { + if ( c == wchar2sjis_mac_wchar_tbl[i][0]) { + s1 = wchar2sjis_mac_wchar_tbl[i][1] & 0xffff; + break; + } + } + } + + if (s1 > 0) { + c1 = s1/94+0x21; + c2 = s1-94*(c1-0x21)+0x21; + s1 = (c1 << 8) | c2; + s2 = 1; + } + } + + if ((s1 <= 0) || (s1 >= 0x8080 && s2 == 0)) { /* not found or X 0212 */ + s1 = -1; + c1 = 0; + + if (c == 0) { + s1 = 0; + } else if (s1 <= 0) { + s1 = -1; + } + } + + if (s1 >= 0) { + if (s1 < 0x100) { /* latin or kana */ + CK((*filter->output_function)(s1, filter->data)); + } else { /* kanji */ + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + break; + + + case 2: + c1 = filter->cache; + filter->cache = 0; + filter->status = 0; + if (c1 == 0xf860) { + for (i=0; i<5; i++) { + if (c == code_tbl_m[i][2]) { + filter->cache = c | 0x10000; + filter->status = 3; + break; + } + } + } else if (c1 == 0xf861) { + for (i=0; i<3; i++) { + if (c == code_tbl_m[i+5][2]) { + filter->cache = c | 0x20000; + filter->status = 3; + break; + } + } + } else if (c1 == 0xf862) { + for (i=0; i<4; i++) { + if (c == code_tbl_m[i+5+3][2]) { + filter->cache = c | 0x40000; + filter->status = 3; + break; + } + } + } + + if (filter->status == 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c1, filter)); + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + + break; + + case 3: + s1 = 0; + c1 = filter->cache & 0xffff; + mode = (filter->cache & 0xf0000) >> 16; + + filter->cache = 0; + filter->status = 0; + + if (mode == 0x1) { + for (i=0; i<5; i++) { + if (c1 == code_tbl_m[i][2] && c == code_tbl_m[i][3]) { + s1 = code_tbl_m[i][0]; + break; + } + } + + if (s1 > 0) { + c1 = s1/94+0x21; + c2 = s1-94*(c1-0x21)+0x21; + SJIS_ENCODE(c1, c2, s1, s2); + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + + if (s1 <= 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(0xf860, filter)); + CK(mbfl_filt_conv_illegal_output(c1, filter)); + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + + } else if (mode == 0x2) { + for (i=0; i<3; i++) { + if (c1 == code_tbl_m[i+5][2] && c == code_tbl_m[i+5][3]) { + filter->cache = c | 0x20000; + filter->status = 4; + break; + } + } + } else if (mode == 0x4) { + for (i=0; i<4; i++) { + if (c1 == code_tbl_m[i+8][2] && c == code_tbl_m[i+8][3]) { + filter->cache = c | 0x40000; + filter->status = 4; + break; + } + } + } + break; + + case 4: + s1 = 0; + c1 = filter->cache & 0xffff; + mode = (filter->cache & 0xf0000) >> 16; + + filter->cache = 0; + filter->status = 0; + + if (mode == 0x2) { + for (i=0; i<3; i++) { + if (c1 == code_tbl_m[i+5][3] && c == code_tbl_m[i+5][4]) { + s1 = code_tbl_m[i+5][0]; + break; + } + } + + if (s1 > 0) { + c1 = s1/94+0x21; + c2 = s1-94*(c1-0x21)+0x21; + SJIS_ENCODE(c1, c2, s1, s2); + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + + if (s1 <= 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(0xf861, filter)); + for (i=0; i<3; i++) { + if (c1 == code_tbl_m[i+5][3]) { + CK(mbfl_filt_conv_illegal_output(code_tbl_m[i+5][2], filter)); + break; + } + } + CK(mbfl_filt_conv_illegal_output(c1, filter)); + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } else if (mode == 0x4) { + for (i=0; i<4; i++) { + if (c1 == code_tbl_m[i+8][3] && c == code_tbl_m[i+8][4]) { + filter->cache = c | 0x40000; + filter->status = 5; + break; + } + } + } + break; + + case 5: + s1 = 0; + c1 = filter->cache & 0xffff; + mode = (filter->cache & 0xf0000) >> 16; + + filter->cache = 0; + filter->status = 0; + + if (mode == 0x4) { + for (i=0; i<4; i++) { + if (c1 == code_tbl_m[i+8][4] && c == code_tbl_m[i+8][5]) { + s1 = code_tbl_m[i+8][0]; + break; + } + } + + if (s1 > 0) { + c1 = s1/94+0x21; + c2 = s1-94*(c1-0x21)+0x21; + SJIS_ENCODE(c1, c2, s1, s2); + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + + if (s1 <= 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(0xf862, filter)); + for (i=0; i<4; i++) { + if (c1 == code_tbl_m[i+8][4]) { + CK(mbfl_filt_conv_illegal_output( code_tbl_m[i+8][2], filter)); + CK(mbfl_filt_conv_illegal_output( code_tbl_m[i+8][3], filter)); + break; + } + } + CK(mbfl_filt_conv_illegal_output(c1, filter)); + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + break; + + default: + filter->status = 0; + break; + } + return c; +} + +static int +mbfl_filt_conv_sjis_mac_flush(mbfl_convert_filter *filter) +{ + int i, c1, s1 = 0; + if (filter->status == 1 && filter->cache > 0) { + c1 = filter->cache; + for (i=0;i<s_form_tbl_len;i++) { + if (c1 == s_form_tbl[i]) { + s1 = s_form_sjis_fallback_tbl[i]; + break; + } + } + if (s1 > 0) { + CK((*filter->output_function)((s1 >> 8) & 0xff, filter->data)); + CK((*filter->output_function)(s1 & 0xff, filter->data)); + } + } + filter->cache = 0; + filter->status = 0; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + + return 0; +} + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.h b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.h new file mode 100644 index 0000000000..3b191aa418 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.h @@ -0,0 +1,44 @@ +/* + * "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_sjis_open.c + * by Rui Hirokawa <hirokawa@php.net> on 25 July 2011. + * + */ + +#ifndef MBFL_MBFILTER_SJIS_MAC_H +#define MBFL_MBFILTER_SJIS_MAC_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_sjis_mac; + +extern const struct mbfl_identify_vtbl vtbl_identify_sjis_mac; +extern const struct mbfl_convert_vtbl vtbl_sjis_mac_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_sjis_mac; + +int mbfl_filt_conv_sjis_mac_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_SJIS_MAC_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c new file mode 100644 index 0000000000..7a549af666 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -0,0 +1,927 @@ + +/* + * "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_sjis_open.c + * by Rui Hirokawa <hirokawa@php.net> on 25 July 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_sjis_mobile.h" + +#include "unicode_table_cp932_ext.h" +#include "unicode_table_jis.h" + +#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[]; + +static const char *mbfl_encoding_sjis_docomo_aliases[] = {"SJIS-DOCOMO", "shift_jis-imode", "x-sjis-emoji-docomo", NULL}; +static const char *mbfl_encoding_sjis_kddi_aliases[] = {"SJIS-KDDI", "shift_jis-kddi", "x-sjis-emoji-kddi", NULL}; +static const char *mbfl_encoding_sjis_sb_aliases[] = {"SJIS-SOFTBANK", "shift_jis-softbank", "x-sjis-emoji-softbank", NULL}; + +const mbfl_encoding mbfl_encoding_sjis_docomo = { + mbfl_no_encoding_sjis_docomo, + "SJIS-Mobile#DOCOMO", + "Shift_JIS", + (const char *(*)[])&mbfl_encoding_sjis_docomo_aliases, + mblen_table_sjis, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const mbfl_encoding mbfl_encoding_sjis_kddi = { + mbfl_no_encoding_sjis_kddi, + "SJIS-Mobile#KDDI", + "Shift_JIS", + (const char *(*)[])&mbfl_encoding_sjis_kddi_aliases, + mblen_table_sjis, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const mbfl_encoding mbfl_encoding_sjis_sb = { + mbfl_no_encoding_sjis_sb, + "SJIS-Mobile#SOFTBANK", + "Shift_JIS", + (const char *(*)[])&mbfl_encoding_sjis_sb_aliases, + mblen_table_sjis, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE +}; + +const struct mbfl_identify_vtbl vtbl_identify_sjis_docomo = { + mbfl_no_encoding_sjis_docomo, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_sjis +}; + +const struct mbfl_identify_vtbl vtbl_identify_sjis_kddi = { + mbfl_no_encoding_sjis_kddi, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_sjis +}; + +const struct mbfl_identify_vtbl vtbl_identify_sjis_sb = { + mbfl_no_encoding_sjis_sb, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_sjis +}; + +const struct mbfl_convert_vtbl vtbl_sjis_docomo_wchar = { + mbfl_no_encoding_sjis_docomo, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_sjis_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_sjis_docomo = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_sjis_docomo, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_sjis_mobile, + mbfl_filt_conv_sjis_mobile_flush +}; + +const struct mbfl_convert_vtbl vtbl_sjis_kddi_wchar = { + mbfl_no_encoding_sjis_kddi, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_sjis_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_sjis_kddi = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_sjis_kddi, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_sjis_mobile, + mbfl_filt_conv_sjis_mobile_flush +}; + +const struct mbfl_convert_vtbl vtbl_sjis_sb_wchar = { + mbfl_no_encoding_sjis_sb, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_sjis_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_sjis_sb = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_sjis_sb, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_sjis_mobile, + mbfl_filt_conv_sjis_mobile_flush +}; + +static const char nflags_s[10][2] = {"CN","DE","ES","FR","GB","IT","JP","KR","RU","US"}; +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 unsigned short mbfl_docomo2uni_pua[4][3] = { + {0x28c2, 0x292f, 0xe63e}, + {0x2930, 0x2934, 0xe6ac}, + {0x2935, 0x2951, 0xe6b1}, + {0x2952, 0x29db, 0xe6ce}, +}; + +const unsigned short mbfl_kddi2uni_pua[7][3] = { + {0x26ec, 0x2838, 0xe468}, + {0x284c, 0x2863, 0xe5b5}, + {0x24b8, 0x24ca, 0xe5cd}, + {0x24cb, 0x2545, 0xea80}, + {0x2839, 0x284b, 0xeafb}, + {0x2546, 0x25c0, 0xeb0e}, + {0x25c1, 0x25c6, 0xeb89}, +}; + +const unsigned short mbfl_sb2uni_pua[6][3] = { + {0x27a9, 0x2802, 0xe101}, + {0x2808, 0x2861, 0xe201}, + {0x2921, 0x297a, 0xe001}, + {0x2980, 0x29cc, 0xe301}, + {0x2a99, 0x2ae4, 0xe401}, + {0x2af8, 0x2b35, 0xe501}, +}; + +const unsigned short mbfl_kddi2uni_pua_b[8][3] = { + {0x24b8, 0x24f6, 0xec40}, + {0x24f7, 0x2573, 0xec80}, + {0x2574, 0x25b2, 0xed40}, + {0x25b3, 0x25c6, 0xed80}, + {0x26ec, 0x272a, 0xef40}, + {0x272b, 0x27a7, 0xef80}, + {0x27a8, 0x27e6, 0xf040}, + {0x27e7, 0x2863, 0xf080}, +}; + +#define NFLAGS(c) (0x1F1A5+(int)(c)) + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +#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 + +int +mbfilter_conv_map_tbl(int c, int *w, const unsigned short map[][3], int n) +{ + int i, match = 0; + + for (i = 0; i < n; i++) { + if (map[i][0] <= c && c <= map[i][1]) { + *w = c - map[i][0] + map[i][2]; + match = 1; + break; + } + } + return match; +} + +int +mbfilter_conv_r_map_tbl(int c, int *w, const unsigned short map[][3], int n) +{ + int i, match = 0; + + for (i = 0; i < n; i++) { + if (map[i][2] <= c && c <= map[i][2] - map[i][0] + map[i][1]) { + *w = c + map[i][0] - map[i][2]; + match = 1; + break; + } + } + return match; +} + +int +mbfilter_sjis_emoji_docomo2unicode(int s, int *snd) +{ + int w = s; + if (s >= mb_tbl_code2uni_docomo1_min && s <= mb_tbl_code2uni_docomo1_max) { + if (s >= mb_tbl_code2uni_docomo1_min + 0x00a2 && + s <= mb_tbl_code2uni_docomo1_min + 0x00ad && + 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; +} + +int +mbfilter_sjis_emoji_kddi2unicode(int s, int *snd) +{ + int w = s, si, c; + const int nflags_order_kddi[] = {3, 1, 5, 4, 0, 7}; + + *snd = 0; + if (s >= mb_tbl_code2uni_kddi1_min && s <= mb_tbl_code2uni_kddi1_max) { + si = s - mb_tbl_code2uni_kddi1_min; + if (si == 0x0008) { /* ES */ + *snd = NFLAGS(nflags_s[2][0]); w = NFLAGS(nflags_s[2][1]); + } else if (si == 0x0009) { /* RU */ + *snd = NFLAGS(nflags_s[8][0]); w = NFLAGS(nflags_s[8][1]); + } else if (si >= 0x008d && si <= 0x0092) { + c = nflags_order_kddi[si-0x008d]; + *snd = NFLAGS(nflags_s[c][0]); w = NFLAGS(nflags_s[c][1]); + } else if (si == 0x0104) { + *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; + if (si == 100) { /* JP */ + *snd = NFLAGS(nflags_s[6][0]); w = NFLAGS(nflags_s[6][1]); + } else if (si >= 0x00ba && si <= 0x00c2) { + *snd = si-0x00ba+0x0031; w = 0x20E3; + } else if (si == 0x010b) { /* US */ + *snd = NFLAGS(nflags_s[9][0]); w = NFLAGS(nflags_s[9][1]); + } else if (si == 0x0144) { + *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; +} + +int +mbfilter_sjis_emoji_sb2unicode(int s, int *snd) +{ + int w = s, si, c; + const int nflags_order_sb[10] = {6, 9, 3, 1, 5, 4, 2, 8, 0, 7}; + + *snd = 0; + if (s >= mb_tbl_code2uni_sb1_min && s <= mb_tbl_code2uni_sb1_max) { + 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) { + c = nflags_order_sb[si-0x0069]; + *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; +} + +int +mbfilter_unicode2sjis_emoji_docomo(int c, int *s1, mbfl_convert_filter *filter) +{ + int i, match = 0, c1s; + + if (filter->status == 1) { + c1s = filter->cache; + filter->cache = 0; + filter->status = 0; + if (c == 0x20E3) { + if (c1s == 0x0023) { + *s1 = 0x2964; + match = 1; + } else if (c1s == 0x0030) { + *s1 = 0x296f; + match = 1; + } else if (c1s >= 0x0031 && c1s <= 0x0039) { + *s1 = 0x2966 + (c1s - 0x0031); + match = 1; + } + } else { + CK((*filter->output_function)(c1s, filter->data)); + } + } else { + if (c == 0x0023 || (c >= 0x0030 && c<=0x0039)) { + filter->status = 1; + filter->cache = c; + *s1 = -1; + return match; + } + + if (c == 0x00A9) { + *s1 = 0x29b5; match = 1; + } else if (c == 0x00AE) { + *s1 = 0x29ba; match = 1; + } else if (c >= mb_tbl_uni_docomo2code2_min && c <= mb_tbl_uni_docomo2code2_max) { + 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) { + 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; + } + } + } + + return match; +} + +int +mbfilter_unicode2sjis_emoji_kddi(int c, int *s1, mbfl_convert_filter *filter) +{ + int i, match = 0, c1s; + + if (filter->status == 1) { + c1s = filter->cache; + filter->cache = 0; + filter->status = 0; + if (c == 0x20E3) { + if (c1s == 0x0023) { + *s1 = 0x25bc; + match = 1; + } else if (c1s == 0x0030) { + *s1 = 0x2830; + match = 1; + } else if (c1s >= 0x0031 && c1s <= 0x0039) { + *s1 = 0x27a6 + (c1s - 0x0031); + match = 1; + } + } else if ((c >= NFLAGS(0x41) && c <= NFLAGS(0x5A)) && (c1s >= NFLAGS(0x41) && c1s <= NFLAGS(0x5A))) { + for (i=0; i<10; i++) { + if (c1s == NFLAGS(nflags_s[i][0]) && c == NFLAGS(nflags_s[i][1])) { + *s1 = nflags_code_kddi[i]; + match = 1; + break; + } + } + } else { + if (c1s >= ucs_a1_jis_table_min && c1s < ucs_a1_jis_table_max) { + c1s = ucs_a1_jis_table[c1s - ucs_a1_jis_table_min]; + CK((*filter->output_function)(c1s, filter->data)); + } + } + } else { + if (c == 0x0023 || ( c >= 0x0030 && c<=0x0039) || + (c >= NFLAGS(0x41) && c<= NFLAGS(0x5A))) { + filter->status = 1; + filter->cache = c; + *s1 = -1; + return match; + } + + if (c == 0x00A9) { + *s1 = 0x27dc; match = 1; + } else if (c == 0x00AE) { + *s1 = 0x27dd; match = 1; + } else if (c >= mb_tbl_uni_kddi2code2_min && c <= mb_tbl_uni_kddi2code2_max) { + 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) { + 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; +} + +int +mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter) +{ + int i, match = 0, c1s; + + if (filter->status == 1) { + filter->status = 0; + c1s = filter->cache; + filter->cache = 0; + if (c == 0x20E3) { + if (c1s == 0x0023) { + *s1 = 0x2817; + match = 1; + } else if (c1s == 0x0030) { + *s1 = 0x282c; + match = 1; + } else if (c1s >= 0x0031 && c1s <= 0x0039) { + *s1 = 0x2823 + (c1s - 0x0031); + match = 1; + } + } else if ((c >= NFLAGS(0x41) && c <= NFLAGS(0x5A)) && (c1s >= NFLAGS(0x41) && c1s <= NFLAGS(0x5A))) { + for (i=0; i<10; i++) { + if (c1s == NFLAGS(nflags_s[i][0]) && c == NFLAGS(nflags_s[i][1])) { + *s1 = nflags_code_sb[i]; + match = 1; + break; + } + } + } else { + if (c1s >= ucs_a1_jis_table_min && c1s < ucs_a1_jis_table_max) { + c1s = ucs_a1_jis_table[c1s - ucs_a1_jis_table_min]; + CK((*filter->output_function)(c1s, filter->data)); + } + } + } else { + if (c == 0x0023 || ( c >= 0x0030 && c<=0x0039) || (c >= NFLAGS(0x41) && c<= NFLAGS(0x5A))) { + filter->status = 1; + filter->cache = c; + *s1 = -1; + return match; + } + + if (c == 0x00A9) { + *s1 = 0x2855; match = 1; + } else if (c == 0x00AE) { + *s1 = 0x2856; match = 1; + } else if (c >= mb_tbl_uni_sb2code2_min && c <= mb_tbl_uni_sb2code2_max) { + 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) { + 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; +} + +/* + * SJIS-win => wchar + */ +int +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 */ + if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb && c == 0x1b) { + filter->cache = c; + filter->status = 2; + } else { + CK((*filter->output_function)(c, filter->data)); + } + } else if (c > 0xa0 && c < 0xe0) { /* kana */ + CK((*filter->output_function)(0xfec0 + c, filter->data)); + } else if (c > 0x80 && c < 0xfd && c != 0xa0) { /* kanji first char */ + filter->status = 1; + filter->cache = c; + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + case 1: /* kanji second char */ + filter->status = 0; + c1 = filter->cache; + if (c >= 0x40 && c <= 0xfc && c != 0x7f) { + w = 0; + SJIS_DECODE(c1, c, s1, s2); + s = (s1 - 0x21)*94 + s2 - 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) { /* X 0208 */ + w = jisx0208_ucs_table[s]; + } else if (s >= cp932ext2_ucs_table_min && s < cp932ext2_ucs_table_max) { /* vendor ext2 (89ku - 92ku) */ + w = cp932ext2_ucs_table[s - cp932ext2_ucs_table_min]; + } else if (s >= cp932ext3_ucs_table_min && s < cp932ext3_ucs_table_max) { /* vendor ext3 (115ku - 119ku) */ + w = cp932ext3_ucs_table[s - cp932ext3_ucs_table_min]; + } else if (s >= (94*94) && s < (114*94)) { /* user (95ku - 114ku) */ + w = s - (94*94) + 0xe000; + } + + if (s >= (94*94) && s < 119*94) { + if (filter->from->no_encoding == mbfl_no_encoding_sjis_docomo) { + w = mbfilter_sjis_emoji_docomo2unicode(s, &snd); + } else if (filter->from->no_encoding == mbfl_no_encoding_sjis_kddi) { + w = mbfilter_sjis_emoji_kddi2unicode(s, &snd); + } else if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb) { + w = mbfilter_sjis_emoji_sb2unicode(s, &snd); + } + + if (w > 0 && snd > 0) { + CK((*filter->output_function)(snd, filter->data)); + } + } + } + if (w <= 0) { + w = (s1 << 8) | s2; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_WINCP932; + } + CK((*filter->output_function)(w, filter->data)); + } 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 : Softbank Emoji */ + case 2: + if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb && + c == 0x24) { + filter->cache = c; + filter->status++; + } else { + filter->cache = 0; + filter->status = 0; + CK((*filter->output_function)(0x1b, filter->data)); + goto retry; + } + break; + + /* ESC $ : Softbank Emoji */ + case 3: + if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb && + ((c >= 0x45 && c <= 0x47) || (c >= 0x4f && c <= 0x51))) { + filter->cache = c; + 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: + w = 0; + if (filter->from->no_encoding == mbfl_no_encoding_sjis_sb) { + c1 = filter->cache; + + if (c == 0x0f) { + w = c; + filter->cache = 0; + filter->status = 0; + } else { + if (c1 == 0x47 && c >= 0x21 && c <= 0x7a) { + s1 = 0x91; s2 = c; + } else if (c1 == 0x45 && c >= 0x21 && c <= 0x7a) { + s1 = 0x8d; s2 = c; + } else if (c1 == 0x46 && c >= 0x21 && c <= 0x7a) { + s1 = 0x8e; s2 = c; + } else if (c1 == 0x4f && c >= 0x21 && c <= 0x6d) { + s1 = 0x92; s2 = c; + } else if (c1 == 0x50 && c >= 0x21 && c <= 0x6c) { + s1 = 0x95; s2 = c; + } else if (c1 == 0x51 && c >= 0x21 && c <= 0x5e) { + s1 = 0x96; s2 = c; + } + s = (s1 - 0x21)*94 + s2 - 0x21; + w = mbfilter_sjis_emoji_sb2unicode(s, &snd); + if (w > 0) { + if (snd > 0) { + CK((*filter->output_function)(snd, filter->data)); + } + CK((*filter->output_function)(w, filter->data)); + } + } + } + + if (w <= 0) { + c1 = filter->cache; + filter->cache = 0; + filter->status = 0; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x24, filter->data)); + CK((*filter->output_function)(c1 & 0xff, filter->data)); + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +/* + * wchar => SJIS-win + */ +int +mbfl_filt_conv_wchar_sjis_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; + s2 = 1; + } + 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 >= 0x8080 && 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 (s1 <= 0) { + c1 = 0; + c2 = cp932ext2_ucs_table_max - cp932ext2_ucs_table_min; + while (c1 < c2) { /* CP932 vendor ext2 (115ku - 119ku) */ + if (c == cp932ext2_ucs_table[c1]) { + s1 = ((c1/94 + 0x93) << 8) + (c1%94 + 0x21); + break; + } + c1++; + } + } + + if (s1 <= 0) { + c1 = 0; + c2 = cp932ext3_ucs_table_max - cp932ext3_ucs_table_min; + while (c1 < c2) { /* CP932 vendor ext3 (115ku - 119ku) */ + if (c == cp932ext3_ucs_table[c1]) { + s1 = ((c1/94 + 0x93) << 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_sjis_docomo && + mbfilter_unicode2sjis_emoji_docomo(c, &s1, filter) > 0) || + (filter->to->no_encoding == mbfl_no_encoding_sjis_kddi && + mbfilter_unicode2sjis_emoji_kddi(c, &s1, filter) > 0) || + (filter->to->no_encoding == mbfl_no_encoding_sjis_sb && + mbfilter_unicode2sjis_emoji_sb(c, &s1, filter) > 0 )) { + CODE2JIS(c1,c2,s1,s2); + } + + if (filter->status == 1 && filter->cache > 0) { + return c; + } + + if (s1 >= 0) { + if (s1 < 0x100) { /* latin or kana */ + CK((*filter->output_function)(s1, filter->data)); + } else { /* kanji */ + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} + +int +mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter) +{ + int c1 = filter->cache; + if (filter->status == 1 && (c1 == 0x0023 || (c1 >= 0x0030 && c1<=0x0039))) { + CK((*filter->output_function)(c1, filter->data)); + } + filter->status = 0; + filter->cache = 0; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + + return 0; +} + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h new file mode 100644 index 0000000000..15a91a58b5 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h @@ -0,0 +1,70 @@ +/* + * "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_sjis_open.c + * by Rui Hirokawa <hirokawa@php.net> on 25 July 2011. + * + */ + +#ifndef MBFL_MBFILTER_SJIS_MOBILE_H +#define MBFL_MBFILTER_SJIS_MOBILE_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_sjis_docomo; +extern const mbfl_encoding mbfl_encoding_sjis_kddi; +extern const mbfl_encoding mbfl_encoding_sjis_sb; + +extern const struct mbfl_identify_vtbl vtbl_identify_sjis_docomo; +extern const struct mbfl_identify_vtbl vtbl_identify_sjis_kddi; +extern const struct mbfl_identify_vtbl vtbl_identify_sjis_sb; + +extern const struct mbfl_convert_vtbl vtbl_sjis_docomo_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_sjis_docomo; +extern const struct mbfl_convert_vtbl vtbl_sjis_kddi_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_sjis_kddi; +extern const struct mbfl_convert_vtbl vtbl_sjis_sb_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_sjis_sb; + +extern const unsigned short mbfl_docomo2uni_pua[4][3]; +extern const unsigned short mbfl_kddi2uni_pua[7][3]; +extern const unsigned short mbfl_sb2uni_pua[6][3]; +extern const unsigned short mbfl_kddi2uni_pua_b[8][3]; + +int mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_sjis_mobile(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter); + +int mbfilter_sjis_emoji_docomo2unicode(int s, int *snd); +int mbfilter_sjis_emoji_kddi2unicode(int s, int *snd); +int mbfilter_sjis_emoji_sb2unicode(int s, int *snd); + +int mbfilter_unicode2sjis_emoji_docomo(int c, int *s1, mbfl_convert_filter *filter); +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 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/filters/mbfilter_sjis_open.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c index 38244a0ac9..81ab32edfd 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c @@ -66,7 +66,7 @@ const mbfl_encoding mbfl_encoding_sjis_open = { "Shift_JIS", (const char *(*)[])&mbfl_encoding_sjis_open_aliases, mblen_table_sjis, - MBFL_ENCTYPE_MBCS + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_sjis_open = { @@ -139,7 +139,6 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjis_open = { } \ } while (0) - /* * SJIS-win => wchar */ @@ -308,6 +307,7 @@ mbfl_filt_conv_wchar_sjis_open(int c, mbfl_convert_filter *filter) s1 = -1; } } + if (s1 >= 0) { if (s1 < 0x100) { /* latin or kana */ CK((*filter->output_function)(s1, filter->data)); diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h index 0bfe1d21ab..f24e42ea22 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h @@ -33,6 +33,7 @@ #include "mbfilter.h" extern const mbfl_encoding mbfl_encoding_sjis_open; + extern const struct mbfl_identify_vtbl vtbl_identify_sjis_open; extern const struct mbfl_convert_vtbl vtbl_sjis_open_wchar; extern const struct mbfl_convert_vtbl vtbl_wchar_sjis_open; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c index c72d93f5fb..86765b2ece 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_uhc.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_uhc.c @@ -33,6 +33,7 @@ #include "mbfilter.h" #include "mbfilter_uhc.h" +#define UNICODE_TABLE_UHC_DEF #include "unicode_table_uhc.h" static int mbfl_filt_ident_uhc(int c, mbfl_identify_filter *filter); diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c index 56d6dd4c97..3cef6b051a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c @@ -173,6 +173,9 @@ int mbfl_filt_conv_utf32_wchar(int c, mbfl_convert_filter *filter) filter->status &= ~0xff; if (n < MBFL_WCSPLANE_UTF32MAX && (n < 0xd800 || n > 0xdfff)) { CK((*filter->output_function)(n, filter->data)); + } else { + n = (n & MBFL_WCSGROUP_MASK) | MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(n, filter->data)); } } break; @@ -205,6 +208,9 @@ int mbfl_filt_conv_utf32be_wchar(int c, mbfl_convert_filter *filter) n = (c & 0xff) | filter->cache; if (n < MBFL_WCSPLANE_UTF32MAX && (n < 0xd800 || n > 0xdfff)) { CK((*filter->output_function)(n, filter->data)); + } else { + n = (n & MBFL_WCSGROUP_MASK) | MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(n, filter->data)); } } return c; @@ -253,7 +259,10 @@ int mbfl_filt_conv_utf32le_wchar(int c, mbfl_convert_filter *filter) n = ((c & 0xff) << 24) | filter->cache; if (n < MBFL_WCSPLANE_UTF32MAX && (n < 0xd800 || n > 0xdfff)) { CK((*filter->output_function)(n, filter->data)); - } + } else { + n = (n & MBFL_WCSGROUP_MASK) | MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(n, filter->data)); + } } return c; } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index ad0205bee1..2bb1dfada1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -57,7 +57,7 @@ const mbfl_encoding mbfl_encoding_utf7 = { "UTF-7", (const char *(*)[])&mbfl_encoding_utf7_aliases, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE }; const struct mbfl_identify_vtbl vtbl_identify_utf7 = { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c index c6777b29fd..fcee610533 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c @@ -34,25 +34,25 @@ #include "mbfilter.h" #include "mbfilter_utf8.h" -static int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter); +int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter); -static const unsigned char mblen_table_utf8[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1 +const unsigned char mblen_table_utf8[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static const char *mbfl_encoding_utf8_aliases[] = {"utf8", NULL}; @@ -98,73 +98,106 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8 = { */ int mbfl_filt_conv_utf8_wchar(int c, mbfl_convert_filter *filter) { - int s; + int s, c1, w = 0, flag = 0; if (c < 0x80) { + if (filter->status != 0) { + w = (filter->cache & MBFL_WCSGROUP_MASK) | MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + filter->status = 0; + filter->cache = 0; + } if (c >= 0) { CK((*filter->output_function)(c, filter->data)); } - filter->status = 0; } else if (c < 0xc0) { int status = filter->status & 0xff; switch (status) { - case 0x10: /* 2byte code 2nd char */ - case 0x21: /* 3byte code 3rd char */ - case 0x32: /* 4byte code 4th char */ - case 0x43: /* 5byte code 5th char */ - case 0x54: /* 6byte code 6th char */ + case 0x10: /* 2byte code 2nd char: 0x80-0xbf */ + case 0x21: /* 3byte code 3rd char: 0x80-0xbf */ + case 0x32: /* 4byte code 4th char: 0x80-0xbf */ filter->status = 0; s = filter->cache | (c & 0x3f); + filter->cache = 0; if ((status == 0x10 && s >= 0x80) || (status == 0x21 && s >= 0x800 && (s < 0xd800 || s > 0xdfff)) || - (status == 0x32 && s >= 0x10000) || - (status == 0x43 && s >= 0x200000) || - (status == 0x54 && s >= 0x4000000 && s < MBFL_WCSGROUP_UCS4MAX)) { + (status == 0x32 && s >= 0x10000 && s < 0x110000)) { CK((*filter->output_function)(s, filter->data)); + } else { + w = s & MBFL_WCSGROUP_MASK; + flag = 1; } break; - case 0x20: /* 3byte code 2nd char */ - case 0x31: /* 4byte code 3rd char */ - case 0x42: /* 5byte code 4th char */ - case 0x53: /* 6byte code 5th char */ - filter->cache |= ((c & 0x3f) << 6); - filter->status++; - break; - case 0x30: /* 4byte code 2nd char */ - case 0x41: /* 5byte code 3rd char */ - case 0x52: /* 6byte code 4th char */ - filter->cache |= ((c & 0x3f) << 12); - filter->status++; + case 0x20: /* 3byte code 2nd char: 0:0xa0-0xbf,D:0x80-9F,1-C,E-F:0x80-0x9f */ + s = filter->cache | ((c & 0x3f) << 6); + c1 = (s >> 12) & 0xf; + if ((c1 == 0x0 && c >= 0xa0) || + (c1 == 0xd && c < 0xa0) || + (c1 > 0x0 && c1 != 0xd)) { + filter->cache = s; + filter->status++; + } else { + w = s & MBFL_WCSGROUP_MASK; + flag = 1; + } break; - case 0x40: /* 5byte code 2nd char */ - case 0x51: /* 6byte code 3rd char */ - filter->cache |= ((c & 0x3f) << 18); + case 0x31: /* 4byte code 3rd char: 0x80-0xbf */ + filter->cache |= ((c & 0x3f) << 6); filter->status++; break; - case 0x50: /* 6byte code 2nd char */ - filter->cache |= ((c & 0x3f) << 24); - filter->status++; + case 0x30: /* 4byte code 2nd char: 0:0x90-0xbf,1-3:0x80-0xbf,4:0x80-0x8f */ + s = filter->cache | ((c & 0x3f) << 12); + c1 = (s >> 18) & 0x7; + if ((c1 == 0x0 && c >= 0x90) || + (c1 > 0x0 && c1 < 0x4) || + (c1 == 0x4 && c < 0x90)) { + filter->cache = s; + filter->status++; + } else { + w = s & MBFL_WCSGROUP_MASK; + flag = 1; + } break; default: - filter->status = 0; + w = c & MBFL_WCSGROUP_MASK; + flag = 1; break; } - } else if (c < 0xe0) { /* 2byte code first char */ - filter->status = 0x10; - filter->cache = (c & 0x1f) << 6; - } else if (c < 0xf0) { /* 3byte code first char */ - filter->status = 0x20; - filter->cache = (c & 0xf) << 12; - } else if (c < 0xf8) { /* 4byte code first char */ - filter->status = 0x30; - filter->cache = (c & 0x7) << 18; - } else if (c < 0xfc) { /* 5byte code first char */ - filter->status = 0x40; - filter->cache = (c & 0x3) << 24; - } else if (c < 0xfe) { /* 6 byte code first char */ - filter->status = 0x50; - filter->cache = (c & 0x1) << 30; + } else if (c < 0xc2) { /* invalid: 0xc0,0xc1 */ + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } else if (c < 0xe0) { /* 2byte code first char: 0xc2-0xdf */ + if (filter->status == 0x0) { + filter->status = 0x10; + filter->cache = (c & 0x1f) << 6; + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + } else if (c < 0xf0) { /* 3byte code first char: 0xe0-0xef */ + if (filter->status == 0x0) { + filter->status = 0x20; + filter->cache = (c & 0xf) << 12; + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + } else if (c < 0xf5) { /* 4byte code first char: 0xf0-0xf4 */ + if (filter->status == 0x0) { + filter->status = 0x30; + filter->cache = (c & 0x7) << 18; + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + + if (flag) { + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); filter->status = 0; filter->cache = 0; } @@ -177,7 +210,7 @@ int mbfl_filt_conv_utf8_wchar(int c, mbfl_convert_filter *filter) */ int mbfl_filt_conv_wchar_utf8(int c, mbfl_convert_filter *filter) { - if (c >= 0 && c < MBFL_WCSGROUP_UCS4MAX) { + if (c >= 0 && c < 0x110000) { if (c < 0x80) { CK((*filter->output_function)(c, filter->data)); } else if (c < 0x800) { @@ -187,21 +220,8 @@ int mbfl_filt_conv_wchar_utf8(int c, mbfl_convert_filter *filter) CK((*filter->output_function)(((c >> 12) & 0x0f) | 0xe0, filter->data)); CK((*filter->output_function)(((c >> 6) & 0x3f) | 0x80, filter->data)); CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data)); - } else if (c < 0x200000) { - CK((*filter->output_function)(((c >> 18) & 0x07) | 0xf0, filter->data)); - CK((*filter->output_function)(((c >> 12) & 0x3f) | 0x80, filter->data)); - CK((*filter->output_function)(((c >> 6) & 0x3f) | 0x80, filter->data)); - CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data)); - } else if (c < 0x4000000) { - CK((*filter->output_function)(((c >> 24) & 0x03) | 0xf8, filter->data)); - CK((*filter->output_function)(((c >> 18) & 0x3f) | 0x80, filter->data)); - CK((*filter->output_function)(((c >> 12) & 0x3f) | 0x80, filter->data)); - CK((*filter->output_function)(((c >> 6) & 0x3f) | 0x80, filter->data)); - CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data)); } else { - CK((*filter->output_function)(((c >> 30) & 0x01) | 0xfc, filter->data)); - CK((*filter->output_function)(((c >> 24) & 0x3f) | 0x80, filter->data)); - CK((*filter->output_function)(((c >> 18) & 0x3f) | 0x80, filter->data)); + CK((*filter->output_function)(((c >> 18) & 0x07) | 0xf0, filter->data)); CK((*filter->output_function)(((c >> 12) & 0x3f) | 0x80, filter->data)); CK((*filter->output_function)(((c >> 6) & 0x3f) | 0x80, filter->data)); CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data)); @@ -215,8 +235,13 @@ int mbfl_filt_conv_wchar_utf8(int c, mbfl_convert_filter *filter) return c; } -static int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter) +int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter) { + int c1; + + c1 = (filter->status >> 8) & 0xff; + filter->status &= 0xff; + if (c < 0x80) { if (c < 0) { filter->flag = 1; /* bad */ @@ -227,22 +252,31 @@ static int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter) } else if (c < 0xc0) { switch (filter->status) { case 0x20: /* 3 byte code 2nd char */ + if ((c1 == 0x0 && c >= 0xa0) || + (c1 == 0xd && c < 0xa0) || + (c1 > 0x0 && c1 != 0xd)) { + filter->status++; + } else { + filter->flag = 1; /* bad */ + filter->status = 0; + } + break; case 0x30: /* 4 byte code 2nd char */ + if ((c1 == 0x0 && c >= 0x90) || + (c1 > 0x0 && c1 < 0x4) || + (c1 == 0x4 && c < 0x90)) { + filter->status++; + } else { + filter->flag = 1; /* bad */ + filter->status = 0; + } + break; case 0x31: /* 4 byte code 3rd char */ - case 0x40: /* 5 byte code 2nd char */ - case 0x41: /* 5 byte code 3rd char */ - case 0x42: /* 5 byte code 4th char */ - case 0x50: /* 6 byte code 2nd char */ - case 0x51: /* 6 byte code 3rd char */ - case 0x52: /* 6 byte code 4th char */ - case 0x53: /* 6 byte code 5th char */ filter->status++; break; case 0x10: /* 2 byte code 2nd char */ case 0x21: /* 3 byte code 3rd char */ case 0x32: /* 4 byte code 4th char */ - case 0x43: /* 5 byte code 5th char */ - case 0x54: /* 6 byte code 6th char */ filter->status = 0; break; default: @@ -250,6 +284,9 @@ static int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter) filter->status = 0; break; } + } else if (c < 0xc2) { /* 0xc0,0xc1 */ + filter->flag = 1; /* bad */ + filter->status = 0; } else { if (filter->status) { filter->flag = 1; /* bad */ @@ -259,12 +296,10 @@ static int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter) filter->status = 0x10; } else if (c < 0xf0) { /* 3 byte code 1st char */ filter->status = 0x20; - } else if (c < 0xf8) { /* 4 byte code 1st char */ + filter->status |= (c & 0xf) << 8; + } else if (c < 0xf5) { /* 4 byte code 1st char */ filter->status = 0x30; - } else if (c < 0xfc) { /* 5 byte code 1st char */ - filter->status = 0x40; - } else if (c < 0xfe) { /* 6 byte code 1st char */ - filter->status = 0x50; + filter->status |= (c & 0x7) << 8; } else { filter->flag = 1; /* bad */ } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c new file mode 100644 index 0000000000..62feca40b6 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c @@ -0,0 +1,362 @@ +/* + * "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.c + * by rui hrokawa <hirokawa@php.net> on 8 aug 2011. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" + +#include "mbfilter_utf8_mobile.h" +#include "mbfilter_sjis_mobile.h" + +extern int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter); + +extern const unsigned char mblen_table_utf8[]; + +static const char *mbfl_encoding_utf8_docomo_aliases[] = {"UTF-8-DOCOMO", "UTF8-DOCOMO", NULL}; +static const char *mbfl_encoding_utf8_kddi_a_aliases[] = {NULL}; +static const char *mbfl_encoding_utf8_kddi_b_aliases[] = {"UTF-8-Mobile#KDDI", "UTF-8-KDDI", "UTF8-KDDI", NULL}; +static const char *mbfl_encoding_utf8_sb_aliases[] = {"UTF-8-SOFTBANK", "UTF8-SOFTBANK", NULL}; + +const mbfl_encoding mbfl_encoding_utf8_docomo = { + mbfl_no_encoding_utf8_docomo, + "UTF-8-Mobile#DOCOMO", + "UTF-8", + (const char *(*)[])&mbfl_encoding_utf8_docomo_aliases, + mblen_table_utf8, + MBFL_ENCTYPE_MBCS +}; + +const mbfl_encoding mbfl_encoding_utf8_kddi_a = { + mbfl_no_encoding_utf8_kddi_a, + "UTF-8-Mobile#KDDI-A", + "UTF-8", + (const char *(*)[])&mbfl_encoding_utf8_kddi_a_aliases, + mblen_table_utf8, + MBFL_ENCTYPE_MBCS +}; + +const mbfl_encoding mbfl_encoding_utf8_kddi_b = { + mbfl_no_encoding_utf8_kddi_b, + "UTF-8-Mobile#KDDI-B", + "UTF-8", + (const char *(*)[])&mbfl_encoding_utf8_kddi_b_aliases, + mblen_table_utf8, + MBFL_ENCTYPE_MBCS +}; + +const mbfl_encoding mbfl_encoding_utf8_sb = { + mbfl_no_encoding_utf8_sb, + "UTF-8-Mobile#SOFTBANK", + "UTF-8", + (const char *(*)[])&mbfl_encoding_utf8_sb_aliases, + mblen_table_utf8, + MBFL_ENCTYPE_MBCS +}; + +const struct mbfl_identify_vtbl vtbl_identify_utf8_docomo = { + mbfl_no_encoding_utf8_docomo, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_utf8 +}; + +const struct mbfl_identify_vtbl vtbl_identify_utf8_kddi_a = { + mbfl_no_encoding_utf8_kddi_a, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_utf8 +}; + +const struct mbfl_identify_vtbl vtbl_identify_utf8_kddi_b = { + mbfl_no_encoding_utf8_kddi_b, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_utf8 +}; + +const struct mbfl_identify_vtbl vtbl_identify_utf8_sb = { + mbfl_no_encoding_utf8_sb, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_utf8 +}; + +const struct mbfl_convert_vtbl vtbl_utf8_docomo_wchar = { + mbfl_no_encoding_utf8_docomo, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_utf8_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_utf8_docomo = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_utf8_docomo, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_utf8_mobile, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_utf8_kddi_a_wchar = { + mbfl_no_encoding_utf8_kddi_a, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_utf8_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_a = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_utf8_kddi_a, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_utf8_mobile, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_utf8_kddi_b_wchar = { + mbfl_no_encoding_utf8_kddi_b, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_utf8_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_b = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_utf8_kddi_b, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_utf8_mobile, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_utf8_sb_wchar = { + mbfl_no_encoding_utf8_sb, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_utf8_mobile_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_utf8_sb = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_utf8_sb, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_utf8_mobile, + mbfl_filt_conv_common_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +/* + * UTF-8 => wchar + */ +int mbfl_filt_conv_utf8_mobile_wchar(int c, mbfl_convert_filter *filter) +{ + int s, w = 0, flag = 0; + int s1 = 0, c1 = 0, snd = 0; + + if (c < 0x80) { + if (c >= 0) { + CK((*filter->output_function)(c, filter->data)); + } + filter->status = 0; + } else if (c < 0xc0) { + int status = filter->status & 0xff; + switch (status) { + case 0x10: /* 2byte code 2nd char: 0x80-0xbf */ + case 0x21: /* 3byte code 3rd char: 0x80-0xbf */ + case 0x32: /* 4byte code 4th char: 0x80-0xbf */ + filter->status = 0; + s = filter->cache | (c & 0x3f); + filter->cache = 0; + if ((status == 0x10 && s >= 0x80) || + (status == 0x21 && s >= 0x800 && (s < 0xd800 || s > 0xdfff)) || + (status == 0x32 && s >= 0x10000 && s < 0x110000)) { + + if (filter->from->no_encoding == mbfl_no_encoding_utf8_docomo && + mbfilter_conv_r_map_tbl(s, &s1, mbfl_docomo2uni_pua, 4) > 0) { + s = mbfilter_sjis_emoji_docomo2unicode(s1, &snd); + } else if (filter->from->no_encoding == mbfl_no_encoding_utf8_kddi_a && + mbfilter_conv_r_map_tbl(s, &s1, mbfl_kddi2uni_pua, 7) > 0) { + s = mbfilter_sjis_emoji_kddi2unicode(s1, &snd); + } else if (filter->from->no_encoding == mbfl_no_encoding_utf8_kddi_b && + mbfilter_conv_r_map_tbl(s, &s1, mbfl_kddi2uni_pua_b, 8) > 0) { + s = mbfilter_sjis_emoji_kddi2unicode(s1, &snd); + } else if (filter->from->no_encoding == mbfl_no_encoding_utf8_sb && + mbfilter_conv_r_map_tbl(s, &s1, mbfl_sb2uni_pua, 6) > 0) { + s = mbfilter_sjis_emoji_sb2unicode(s1, &snd); + } + + if (snd > 0) { + CK((*filter->output_function)(snd, filter->data)); + } + CK((*filter->output_function)(s, filter->data)); + } else { + w = s & MBFL_WCSGROUP_MASK; + flag = 1; + } + break; + case 0x20: /* 3byte code 2nd char: 0:0xa0-0xbf,D:0x80-9F,1-C,E-F:0x80-0x9f */ + s = filter->cache | ((c & 0x3f) << 6); + c1 = (s >> 12) & 0xf; + if ((c1 == 0x0 && c >= 0xa0) || + (c1 == 0xd && c < 0xa0) || + (c1 > 0x0 && c1 != 0xd)) { + filter->cache = s; + filter->status++; + } else { + w = s & MBFL_WCSGROUP_MASK; + flag = 1; + } + break; + case 0x31: /* 4byte code 3rd char: 0x80-0xbf */ + filter->cache |= ((c & 0x3f) << 6); + filter->status++; + break; + case 0x30: /* 4byte code 2nd char: 0:0x90-0xbf,1-3:0x80-0xbf,4:0x80-0x8f */ + s = filter->cache | ((c & 0x3f) << 12); + c1 = (s >> 18) & 0x7; + if ((c1 == 0x0 && c >= 0x90) || + (c1 > 0x0 && c1 < 0x4) || + (c1 == 0x4 && c < 0x90)) { + filter->cache = s; + filter->status++; + } else { + w = s & MBFL_WCSGROUP_MASK; + flag = 1; + } + break; + default: + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + break; + } + } else if (c < 0xc2) { /* invalid: 0xc0,0xc1 */ + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } else if (c < 0xe0) { /* 2byte code first char: 0xc2-0xdf */ + if (filter->status == 0x0) { + filter->status = 0x10; + filter->cache = (c & 0x1f) << 6; + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + } else if (c < 0xf0) { /* 3byte code first char: 0xe0-0xef */ + if (filter->status == 0x0) { + filter->status = 0x20; + filter->cache = (c & 0xf) << 12; + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + } else if (c < 0xf5) { /* 4byte code first char: 0xf0-0xf4 */ + if (filter->status == 0x0) { + filter->status = 0x30; + filter->cache = (c & 0x7) << 18; + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + } else { + w = c & MBFL_WCSGROUP_MASK; + flag = 1; + } + + if (flag) { + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + filter->status = 0; + filter->cache = 0; + } + + return c; +} + +/* + * wchar => UTF-8 + */ +int mbfl_filt_conv_wchar_utf8_mobile(int c, mbfl_convert_filter *filter) +{ + if (c >= 0 && c < 0x110000) { + int s1, c1; + + if ((filter->to->no_encoding == mbfl_no_encoding_utf8_docomo && + mbfilter_unicode2sjis_emoji_docomo(c, &s1, filter) > 0 && + mbfilter_conv_map_tbl(s1, &c1, mbfl_docomo2uni_pua, 4) > 0) || + (filter->to->no_encoding == mbfl_no_encoding_utf8_kddi_a && + mbfilter_unicode2sjis_emoji_kddi(c, &s1, filter) > 0 && + mbfilter_conv_map_tbl(s1, &c1, mbfl_kddi2uni_pua, 7) > 0) || + (filter->to->no_encoding == mbfl_no_encoding_utf8_kddi_b && + mbfilter_unicode2sjis_emoji_kddi(c, &s1, filter) > 0 && + mbfilter_conv_map_tbl(s1, &c1, mbfl_kddi2uni_pua_b, 8) > 0) || + (filter->to->no_encoding == mbfl_no_encoding_utf8_sb && + mbfilter_unicode2sjis_emoji_sb(c, &s1, filter) > 0 && + mbfilter_conv_map_tbl(s1, &c1, mbfl_sb2uni_pua, 6) > 0)) { + c = c1; + } + + if (filter->status == 1 && filter->cache > 0) { + return c; + } + + if (c < 0x80) { + CK((*filter->output_function)(c, filter->data)); + } else if (c < 0x800) { + CK((*filter->output_function)(((c >> 6) & 0x1f) | 0xc0, filter->data)); + CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data)); + } else if (c < 0x10000) { + CK((*filter->output_function)(((c >> 12) & 0x0f) | 0xe0, filter->data)); + CK((*filter->output_function)(((c >> 6) & 0x3f) | 0x80, filter->data)); + CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data)); + } else { + CK((*filter->output_function)(((c >> 18) & 0x07) | 0xf0, filter->data)); + CK((*filter->output_function)(((c >> 12) & 0x3f) | 0x80, filter->data)); + CK((*filter->output_function)(((c >> 6) & 0x3f) | 0x80, filter->data)); + CK((*filter->output_function)((c & 0x3f) | 0x80, 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_utf8_mobile.h b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h new file mode 100644 index 0000000000..ef5e6da7f9 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h @@ -0,0 +1,55 @@ +/* + * "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.c + * by rui hrokawa <hirokawa@php.net> on 8 aug 2011. + * + */ + +#ifndef MBFL_MBFILTER_UTF8_MOBILE_H +#define MBFL_MBFILTER_UTF8_MOBILE_H + +extern const mbfl_encoding mbfl_encoding_utf8_docomo; +extern const mbfl_encoding mbfl_encoding_utf8_kddi_a; +extern const mbfl_encoding mbfl_encoding_utf8_kddi_b; +extern const mbfl_encoding mbfl_encoding_utf8_sb; + +extern const struct mbfl_identify_vtbl vtbl_identify_utf8_docomo; +extern const struct mbfl_identify_vtbl vtbl_identify_utf8_kddi_a; +extern const struct mbfl_identify_vtbl vtbl_identify_utf8_kddi_b; +extern const struct mbfl_identify_vtbl vtbl_identify_utf8_sb; + +extern const struct mbfl_convert_vtbl vtbl_utf8_docomo_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_utf8_docomo; +extern const struct mbfl_convert_vtbl vtbl_utf8_kddi_a_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_a; +extern const struct mbfl_convert_vtbl vtbl_utf8_kddi_b_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_b; +extern const struct mbfl_convert_vtbl vtbl_utf8_sb_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_utf8_sb; + +int mbfl_filt_conv_utf8_mobile_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_utf8_mobile(int c, mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_UTF8_MOBILE_H */ diff --git a/ext/mbstring/libmbfl/filters/mk_emoji_tbl.pl b/ext/mbstring/libmbfl/filters/mk_emoji_tbl.pl new file mode 100755 index 0000000000..5b5c3d63ff --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mk_emoji_tbl.pl @@ -0,0 +1,425 @@ +#!/usr/bin/perl +# script to generate Shift_JIS encoded Emoji to/from Unicode conversion table. +# Rui Hirokawa <hirokawa@php.net> +# +# usage: mktbl.pl EmojiSources.txt +# +# Unicoe;DoCoMo;KDDI;SoftBank + +@docomo = (); +@kddi = (); +@softbank = (); + +@to_docomo = (); +@to_kddi = (); +@to_sb = (); + +$fname = "emoji2uni.h"; +open(OUT,">$fname") or die $!; + +sub sjis2code { + my @c = unpack("C*", pack("H4", $_[0])); + + # Shift_JIS -> JIS + $c[0] = (($c[0]-($c[0]<160?112:176))<<1)-($c[1]<159?1:0); + $c[1] -= ($c[1]<159?($c[1]>127?32:31):126); + + $s = ($c[0] - 0x21)*94 + $c[1]-0x21; + + return $s; +} + +sub show_code { + my @c = @_; + $s = "\t"; + for ($i=0; $i<=$#c; $i++) {# + if ($c[$i]) { + @v = split(' ',$c[$i]); + $s .= "0x$v[0], \t"; + if ($#v > 0) { + print "$i $v[0] $v[1]\n"; + } + } else { + $s .= "0x0000, \t"; + } + if ($i % 4 == 3) { + $s .= "\n\t"; + } + } + return $s; +} + +while(<>) { + if ($_ =~ /^\d+/) { + @v = split(/;/,$_); + if ($v[1] =~ /[\dA-F]+/) { + $code = &sjis2code($v[1]); + $docomo{$code} = $v[0]; + $to_docomo{$v[0]} = $code; + } + if ($v[2] =~ /[\dA-F]+/) { + $code = &sjis2code($v[2]); + $kddi{$code} = $v[0]; + $to_kddi{$v[0]} = $code; + } + if ($v[3] =~ /[\dA-F]+/) { + $code = &sjis2code($v[3]); + $softbank{$code} = $v[0]; + $to_sb{$v[0]} = $code; + } + } +} + +print "DoCoMo\n"; + +$docomo_min = 10434; +$docomo_max = 10434+281; +@docomo_v = (); + +foreach $key (sort {hex($a) <=> hex($b)} keys(%docomo)) { + $s = $key; + $pos = $s % 94; + $ku = ($s - $pos)/94; + $v = $key - $docomo_min; + #print "$ku:$pos - ". $v ."=> $docomo{$key}\n"; + $docomo_v[$key-$docomo_min] = $docomo{$key}; +} + +$to_docomo_min = 10434; + +$to_docomo_min1 = 0x0023; +$to_docomo_max1 = 0x00AE; +$to_docomo_min2 = 0x203C; +$to_docomo_max2 = 0x3299; +$to_docomo_min3 = 0x1F17F; +$to_docomo_max3 = 0x1F6BB; + +@r_docomo1_key = (); +@r_docomo1_val = (); + +@r_docomo2_key = (); +@r_docomo2_val = (); + +@r_docomo3_key = (); +@r_docomo3_val = (); + + +foreach $key (sort {hex($a) <=> hex($b)} keys(%to_docomo)) { + $s = $to_docomo{$key}; + + $pos = $s % 94; + $ku = ($s - $pos)/94; + $v = $to_docomo{$key} - $to_docomo_min; + $h = sprintf("%x",$s); + #print "$ku:$pos = $h ($v) <= $key\n"; + if (hex($key) <= $to_docomo_max1) { + push(@r_docomo1_key, $key); + push(@r_docomo1_val, sprintf("%x", $to_docomo{$key})); + } elsif (hex($key) <= $to_docomo_max2) { + push(@r_docomo2_key, $key); + push(@r_docomo2_val, $h); + } elsif (hex($key) >= $to_docomo_max3) { + push(@r_docomo3_key, $key); + push(@r_docomo3_val, $h); + } +} + +push(@r_docomo1_key, 0x00); +push(@r_docomo1_val, 0x00); +push(@r_docomo2_key, 0x00); +push(@r_docomo2_val, 0x00); +push(@r_docomo3_key, 0x00); +push(@r_docomo3_val, 0x00); + +print OUT "int mb_tbl_code2uni_docomo_min = $docomo_min;\n"; +print OUT "int mb_tbl_code2uni_docomo_max = $docomo_max;\n\n"; + +print OUT "int mb_tbl_code2uni_docomo[] = {\n"; +print OUT &show_code(@docomo_v); +print OUT "};\n\n"; + +print OUT "int mb_tbl_uni_docomo2code_min1 = $to_docomo_min1;\n"; +print OUT "int mb_tbl_uni_docomo2code_max1 = $to_docomo_max1;\n"; +print OUT "int mb_tbl_uni_docomo2code_min2 = $to_docomo_min2;\n"; +print OUT "int mb_tbl_uni_docomo2code_max2 = $to_docomo_max2;\n"; +print OUT "int mb_tbl_uni_docomo2code_min3 = $to_docomo_min3;\n"; +print OUT "int mb_tbl_uni_docomo2code_max3 = $to_docomo_max3;\n\n"; + +#print "DOCOMO reverse 1\n"; + +print OUT "int mb_tbl_uni_docomo2code_key1[] = {\n"; +print OUT &show_code(@r_docomo1_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_docomo2code_val1[] = {\n"; +print OUT &show_code(@r_docomo1_val),"\n"; +print OUT "};\n\n"; + +#print "DOCOMO reverse 2\n"; + +print OUT "int mb_tbl_uni_docomo2code_key2[] = {\n"; +print OUT &show_code(@r_docomo2_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_docomo2code_val2[] = {\n"; +print OUT &show_code(@r_docomo2_val),"\n"; +print OUT "};\n\n"; + +print "DOCOMO reverse 3\n"; + +print OUT "int mb_tbl_uni_docomo2code_key3[] = {\n"; +print OUT &show_code(@r_docomo3_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_docomo2code_val3[] = {\n"; +print OUT &show_code(@r_docomo3_val),"\n"; +print OUT "};\n\n"; + +#print "DOCOMO reverse end \n"; + +$kddi_min1 = 9400; +$kddi_max1 = 9400+264; +$kddi_min2 = 9400+564; +$kddi_max2 = 9400+939; + +@kddi_v1 = (); +@kddi_v2 = (); + +#print "KDDI\n"; + +foreach $key (sort {hex($a) <=> hex($b)} keys(%kddi)) { + $s = $key; + $pos = $s % 94; + $ku = ($s - $pos)/94; + $v = $key - $kddi_min1; + $h = sprintf("%x",$key); + #print "$ku:$pos :: $v ($h) => $kddi{$key}\n"; + + if ($key <= $kddi_max1) { + $kddi_v1[$key-$kddi_min1] = $kddi{$key}; + } elsif ($key <= $kddi_max2) { + $kddi_v2[$key-$kddi_min2] = $kddi{$key}; + } +} + +$to_kddi_min = 9660; +$to_kddi_min1 = 0x0030; +$to_kddi_max1 = 0x00AE; +$to_kddi_min2 = 0x2002; +$to_kddi_max2 = 0x3299; +$to_kddi_min3 = 0x1F004; +$to_kddi_max3 = 0x1F6C0; + +@r_kddi1_key = (); @r_kddi1_val = (); +@r_kddi2_key = (); @r_kddi2_val = (); +@r_kddi3_key = (); @r_kddi3_val = (); + +foreach $key (sort {hex($a) <=> hex($b)} keys(%to_kddi)) { + $s = $to_kddi{$key}; + + $pos = $s % 94; + $ku = ($s - $pos)/94; + $v = $to_kddi{$key} - $to_kddi_min; + $h = sprintf("%x",$s); + #print "$ku:$pos = $h ($v) <= $key\n"; + if (hex($key) <= $to_kddi_max1) { + push(@r_kddi1_key, $key); + push(@r_kddi1_val, $h); + } elsif (hex($key) <= $to_kddi_max2) { + push(@r_kddi2_key, $key); + push(@r_kddi2_val, $h); + } else { + push(@r_kddi3_key, $key); + push(@r_kddi3_val, $h); + } +} + +push(@r_kddi1_key, 0x00); +push(@r_kddi1_val, 0x00); +push(@r_kddi2_key, 0x00); +push(@r_kddi2_val, 0x00); +push(@r_kddi3_key, 0x00); +push(@r_kddi3_val, 0x00); + +print OUT "int mb_tbl_code2uni_kddi1_min = $kddi_min1;\n"; +print OUT "int mb_tbl_code2uni_kddi1_max = $kddi_max1;\n"; +print OUT "int mb_tbl_code2uni_kddi2_min = $kddi_min2;\n"; +print OUT "int mb_tbl_code2uni_kddi2_max = $kddi_max2;\n\n"; + +#print "KDDI 1\n"; + +print OUT "int mb_tbl_code2uni_kddi1[] = {\n"; +print OUT &show_code(@kddi_v1); +print OUT "};\n\n"; + +#print "KDDI 2\n"; + +print OUT "int mb_tbl_code2uni_kddi2[] = {\n"; +print OUT &show_code(@kddi_v2); +print OUT "};\n\n"; + +print OUT "int mb_tbl_uni_kddi2code_min1 = $to_kddi_min1;\n"; +print OUT "int mb_tbl_uni_kddi2code_max1 = $to_kddi_max1;\n"; +print OUT "int mb_tbl_uni_kddi2code_min2 = $to_kddi_min2;\n"; +print OUT "int mb_tbl_uni_kddi2code_max2 = $to_kddi_max2;\n"; +print OUT "int mb_tbl_uni_kddi2code_min3 = $to_kddi_min3;\n"; +print OUT "int mb_tbl_uni_kddi2code_max3 = $to_kddi_max3;\n\n"; + +#print "KDDI reverse 1\n"; + +print OUT "int mb_tbl_uni_kddi2code_key1[] = {\n"; +print OUT &show_code(@r_kddi1_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_kddi2code_val1[] = {\n"; +print OUT &show_code(@r_kddi1_val),"\n"; +print OUT "};\n\n"; + +#print "KDDI reverse 1\n"; + +print OUT "int mb_tbl_uni_kddi2code_key2[] = {\n"; +print OUT &show_code(@r_kddi2_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_kddi2code_val2[] = {\n"; +print OUT &show_code(@r_kddi2_val),"\n"; +print OUT "};\n\n"; + +#print "KDDI reverse 3\n"; + +print OUT "int mb_tbl_uni_kddi2code_key3[] = {\n"; +print OUT &show_code(@r_kddi3_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_kddi2code_val3[] = {\n"; +print OUT &show_code(@r_kddi3_val),"\n"; +print OUT "};\n\n"; + + +$sb_min1 = 10153; +$sb_max1 = 10153+177; +$sb_min2 = 10153+376; +$sb_max2 = 10153+547; +$sb_min3 = 10153+752; +$sb_max3 = 10153+901; + +@sb_v1 = (); +@sb_v2 = (); +@sb_v3 = (); + +if (1) { + print "SoftBank\n"; + + foreach $key (sort {hex($a) <=> hex($b)} keys(%softbank)) { + $s = $key; + $pos = $s % 94; + $ku = ($s - $pos)/94; + $v = $key - $sb_min1; + $h = sprintf("%x",$key); + #print "$ku:$pos :: $v ($h) => $softbank{$key}\n"; + if ($key <= $sb_max1) { + $sb_v1[$key-$sb_min1] = $softbank{$key}; + } elsif ($key <= $sb_max2) { + $sb_v2[$key-$sb_min2] = $softbank{$key}; + } elsif ($key <= $sb_max3) { + $sb_v3[$key-$sb_min3] = $softbank{$key}; + } + } + +} + +$to_sb_min = 10263; +$to_sb_min1 = 0x0023; +$to_sb_max1 = 0x00AE; +$to_sb_min2 = 0x2122; +$to_sb_max2 = 0x3299; +$to_sb_min3 = 0x1F004; +$to_sb_max3 = 0x1F6C0; + +@r_sb1_key = (); @r_sb1_val = (); +@r_sb2_key = (); @r_sb2_val = (); +@r_sb3_key = (); @r_sb3_val = (); + +foreach $key (sort {hex($a) <=> hex($b)} keys(%to_sb)) { + $s = $to_sb{$key}; + + $pos = $s % 94; + $ku = ($s - $pos)/94; + $v = $to_sb{$key} - $to_sb_min; + $h = sprintf("%x",$s); + #print "$ku:$pos = $h ($v) <= $key\n"; + if (hex($key) <= $to_sb_max1) { + push(@r_sb1_key, $key); + push(@r_sb1_val, $h); + } elsif (hex($key) >= $to_sb_min2 && hex($key) <= $to_sb_max2) { + push(@r_sb2_key, $key); + push(@r_sb2_val, $h); + } else { + push(@r_sb3_key, $key); + push(@r_sb3_val, $h); + } +} + +push(@r_sb1_key, 0x00); +push(@r_sb1_val, 0x00); +push(@r_sb2_key, 0x00); +push(@r_sb2_val, 0x00); +push(@r_sb3_key, 0x00); +push(@r_sb3_val, 0x00); + + +print OUT "int mb_tbl_code2uni_sb1_min = $sb_min1;\n"; +print OUT "int mb_tbl_code2uni_sb1_max = $sb_max1;\n"; +print OUT "int mb_tbl_code2uni_sb2_min = $sb_min2;\n"; +print OUT "int mb_tbl_code2uni_sb2_max = $sb_max2;\n"; +print OUT "int mb_tbl_code2uni_sb3_min = $sb_min3;\n"; +print OUT "int mb_tbl_code2uni_sb3_max = $sb_max3;\n\n"; + +#print "SoftBank 1\n"; + +print OUT "int mb_tbl_code2uni_sb1[] = {\n"; +print OUT &show_code(@sb_v1); +print OUT "};\n\n"; + +#print "SoftBank 2\n"; + +print OUT "int mb_tbl_code2uni_sb2[] = {\n"; +print OUT &show_code(@sb_v2); +print OUT "};\n\n"; + +#print "SoftBank 3\n"; + +print OUT "int mb_tbl_code2uni_sb3[] = {\n"; +print OUT &show_code(@sb_v3); +print OUT "};\n\n"; + +print OUT "int mb_tbl_uni_sb2code_min1 = $to_sb_min1;\n"; +print OUT "int mb_tbl_uni_sb2code_max1 = $to_sb_max1;\n"; +print OUT "int mb_tbl_uni_sb2code_min2 = $to_sb_min2;\n"; +print OUT "int mb_tbl_uni_sb2code_max2 = $to_sb_max2;\n"; +print OUT "int mb_tbl_uni_sb2code_min3 = $to_sb_min3;\n"; +print OUT "int mb_tbl_uni_sb2code_max3 = $to_sb_max3;\n\n"; + +#print "SB reverse 1\n"; + +print OUT "int mb_tbl_uni_sb2code_key1[] = {\n"; +print OUT &show_code(@r_sb1_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_sb2code_val1[] = {\n"; +print OUT &show_code(@r_sb1_val),"\n"; +print OUT "};\n\n"; + +#print "SB reverse 2\n"; + +print OUT "int mb_tbl_uni_sb2code_key2[] = {\n"; +print OUT &show_code(@r_sb2_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_sb2code_val2[] = {\n"; +print OUT &show_code(@r_sb2_val),"\n"; +print OUT "};\n\n"; + +#print "SB reverse 3\n"; + +print OUT "int mb_tbl_uni_sb2code_key3[] = {\n"; +print OUT &show_code(@r_sb3_key),"\n"; +print OUT "};\n\n"; +print OUT "int mb_tbl_uni_sb2code_val3[] = {\n"; +print OUT &show_code(@r_sb3_val),"\n"; +print OUT "};\n\n"; + + +close(OUT); diff --git a/ext/mbstring/libmbfl/filters/sjis_mac2uni.h b/ext/mbstring/libmbfl/filters/sjis_mac2uni.h new file mode 100644 index 0000000000..1bd77c91a3 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/sjis_mac2uni.h @@ -0,0 +1,349 @@ + + +static const unsigned short sjis_mac2wchar1[] = { // 0x03ac - 0x03c9 +0x339c, 0x339f, 0x339d, 0x33a0, +0x33a4, 0xff4d, 0x33a1, 0x33a5, +0x339e, 0x33a2, 0x338e, 0xff47, +0x338f, 0x33c4, 0x3396, 0x3397, +0x2113, 0x3398, 0x33b3, 0x33b2, +0x33b1, 0x33b0, 0x2109, 0x33d4, +0x33cb, 0x3390, 0x3385, 0x3386, +0x3387, 0xf860, }; +static const unsigned short sjis_mac2wchar2[] = { // 0x0406 - 0x0420 +0x2116, 0x33cd, +0x2121, 0xf861, 0x2664, 0x2667, +0x2661, 0x2662, 0x2660, 0x2663, +0x2665, 0x2666, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x3020, 0x260e, +0x3004, }; +static const unsigned short sjis_mac2wchar3[] = { // 0x0432 - 0x0441 +0x261e, 0x261c, +0x261d, 0x261f, 0x21c6, 0x21c4, +0x21c5, 0xf860, 0x21e8, 0x21e6, +0x21e7, 0x21e9, 0x21e8, 0x21e6, +0x21e7, 0x21e9, }; +static const unsigned short sjis_mac2wchar4[] = { // 0x0468 - 0x0480 +0x3230, 0x322a, 0x322b, 0x322c, +0x322d, 0x322e, 0x322f, 0x3240, +0x3237, 0x3242, 0x3243, 0x3239, +0x323a, 0x3231, 0x323e, 0x3234, +0x3232, 0x323b, 0x3236, 0x3233, +0x3235, 0x323c, 0x323d, 0x323f, +0x3238, }; +static const unsigned short sjis_mac2wchar5[] = { // 0x04b8 - 0x04e8 +0x5927, 0x5c0f, 0x32a4, 0x32a5, +0x32a6, 0x32a7, 0x32a8, 0x32a9, +0x3296, 0x329d, 0x3298, 0x329e, +0x63a7, 0x3299, 0x3349, 0x3322, +0x334d, 0x3314, 0x3316, 0x3305, +0x3333, 0x334e, 0x3303, 0x3336, +0x3318, 0x3315, 0x3327, 0x3351, +0x334a, 0x3339, 0x3357, 0x330d, +0x3342, 0x3323, 0x3326, 0x333b, +0x332b, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x3300, 0x331e, 0x332a, 0x3331, +0x3347, }; +static const unsigned short sjis_mac2wchar6[] = { // 0x050c - 0x0551 +0x337e, 0x337d, 0x337c, 0x337b, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x337f, 0xf862, 0xf862, +0x222e, 0x221f, 0x22bf, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x301d, 0x301f, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x3094, 0x0000, 0x30f7, 0x30f8, +0x30f9, 0x30fa, }; +static const unsigned short sjis_mac2wchar7[] = { // 0x1ed9 - 0x1f18 +0x3001, 0x3002, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0xffe3, 0xfe33, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x30fc, +0xfe31, 0x2010, 0x0000, 0x0000, +0x301c, 0x2016, 0xff5c, 0x2026, +0xfe30, 0x0000, 0x0000, 0x0000, +0x0000, 0xfe35, 0xfe36, 0xfe39, +0xfe3a, 0xff3b, 0xff3d, 0xfe37, +0xfe38, 0xfe3f, 0xfe40, 0xfe3d, +0xfe3e, 0xfe41, 0xfe42, 0xfe43, +0xfe44, 0xfe3b, 0xfe3c, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0xff1d, }; +static const unsigned short sjis_mac2wchar8[] = { // 0x1ff2 - 0x20a5 +0x3041, 0x0000, +0x3043, 0x0000, 0x3045, 0x0000, +0x3047, 0x0000, 0x3049, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x3063, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x3083, 0x0000, 0x3085, 0x0000, +0x3087, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x308e, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x30a1, 0x0000, 0x30a3, 0x0000, +0x30a5, 0x0000, 0x30a7, 0x0000, +0x30a9, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x30c3, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x30e3, 0x0000, +0x30e5, 0x0000, 0x30e7, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x30ee, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x30f5, 0x30f6, }; + +static const unsigned short wchar2sjis_mac4[] = { // 0x2660 - 0x2667 +0x040e, 0x040c, 0x040d, 0x040f, +0x040a, 0x0410, 0x0411, 0x040b, +}; + +static const unsigned short wchar2sjis_mac7[] = { // 0x322a - 0x3243 +0x0469, 0x046a, +0x046b, 0x046c, 0x046d, 0x046e, +0x0468, 0x0475, 0x0478, 0x047b, +0x0477, 0x047c, 0x047a, 0x0470, +0x0480, 0x0473, 0x0474, 0x0479, +0x047d, 0x047e, 0x0476, 0x047f, +0x046f, 0x0000, 0x0471, 0x0472, +}; + +static const unsigned short wchar2sjis_mac8[] = { // 0x3296 - 0x329e +0x04c0, 0x0000, +0x04c2, 0x04c5, 0x0000, 0x0000, +0x0000, 0x04c1, 0x04c3, }; + +static const unsigned short wchar2sjis_mac9[] = { // 0x3300 - 0x33d4 +0x04e4, 0x0000, 0x0000, 0x04ce, +0x0000, 0x04cb, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x04d7, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x04c9, 0x04d1, 0x04ca, 0x0000, +0x04d0, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x04e5, 0x0000, +0x0000, 0x0000, 0x04c7, 0x04d9, +0x0000, 0x0000, 0x04da, 0x04d2, +0x0000, 0x0000, 0x04e6, 0x04dc, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x04e7, 0x0000, 0x04cc, +0x0000, 0x0000, 0x04cf, 0x0000, +0x0000, 0x04d5, 0x0000, 0x04db, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x04d8, 0x0000, +0x0000, 0x0000, 0x0000, 0x04e8, +0x0000, 0x04c6, 0x04d4, 0x0000, +0x0000, 0x04c8, 0x04cd, 0x0000, +0x0000, 0x04d3, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x04d6, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x050f, +0x050e, 0x050d, 0x050c, 0x0521, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x03c6, 0x03c7, 0x03c8, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x03b6, 0x03b8, +0x03c5, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x03ba, 0x03bb, +0x03bd, 0x0000, 0x0000, 0x0000, +0x03ac, 0x03ae, 0x03b4, 0x03ad, +0x03af, 0x03b2, 0x03b5, 0x0000, +0x03b0, 0x03b3, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x03c1, 0x03c0, 0x03bf, 0x03be, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x03b9, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x03c4, +0x0000, 0x0407, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, +0x03c3, }; + +static const unsigned short wchar2sjis_mac10[] = { // 0xfe30 - 0xfe44 +0x1efc, 0x1ef4, 0x0000, 0x1ee9, +0x0000, 0x1f01, 0x1f02, 0x1f07, +0x1f08, 0x1f03, 0x1f04, 0x1f11, +0x1f12, 0x1f0b, 0x1f0c, 0x1f09, +0x1f0a, 0x1f0d, 0x1f0e, 0x1f0f, +0x1f10, }; + +static const unsigned short code_tbl[][3] = { + {0x02f0, 0x0303, 0x2460}, + {0x030e, 0x0321, 0x2474}, + {0x032c, 0x0334, 0x2776}, + {0x0341, 0x0349, 0x2488}, + {0x034e, 0x0359, 0x2160}, + {0x0362, 0x036d, 0x2170}, + {0x038a, 0x03a3, 0x249c}, +}; + +static const unsigned short code_ofst_tbl[] [2]= { + {0x03ac, 0x03c9}, + {0x0406, 0x0420}, + {0x0432, 0x0441}, + {0x0468, 0x0480}, + {0x04b8, 0x04e8}, + {0x050c, 0x0551}, + {0x1ed9, 0x1f18}, + {0x1ff2, 0x20a5}, +}; + +static const unsigned short *code_map[] = { + sjis_mac2wchar1, sjis_mac2wchar2, sjis_mac2wchar3, sjis_mac2wchar4, + sjis_mac2wchar5, sjis_mac2wchar6, sjis_mac2wchar7, sjis_mac2wchar8}; + +static const unsigned short code_tbl_m[][6] = { + {0x0340, 0xf860, 0x0030, 0x002e, 0x0000, 0x0000}, + {0x03c9, 0xf860, 0x0054, 0x0042, 0x0000, 0x0000}, + {0x035c, 0xf860, 0x0058, 0x0056, 0x0000, 0x0000}, + {0x0370, 0xf860, 0x0078, 0x0076, 0x0000, 0x0000}, + {0x0439, 0xf860, 0x2193, 0x2191, 0x0000, 0x0000}, + {0x0409, 0xf861, 0x0046, 0x0041, 0x0058, 0x0000}, + {0x035b, 0xf861, 0x0058, 0x0049, 0x0056, 0x0000}, + {0x036f, 0xf861, 0x0078, 0x0069, 0x0076, 0x0000}, + {0x035a, 0xf862, 0x0058, 0x0049, 0x0049, 0x0049}, + {0x036e, 0xf862, 0x0078, 0x0069, 0x0069, 0x0069}, + {0x0522, 0xf862, 0x6709, 0x9650, 0x4f1a, 0x793e}, + {0x0523, 0xf862, 0x8ca1, 0x56e3, 0x6cd5, 0x4eba}, +}; + +static int code_tbl_m_len = sizeof(code_tbl_m)/(sizeof(unsigned short)*6); + +static const unsigned short s_form_tbl[] = { + 0x2010,0x2016,0x2026, + 0x3001,0x3002,0x301c,0x3041,0x3043,0x3045,0x3047,0x3049, + 0x3063,0x3083,0x3085,0x3087,0x308e,0x30a1,0x30a3,0x30a5, + 0x30a7,0x30a9,0x30c3,0x30e3,0x30e5,0x30e7,0x30ee,0x30f5, + 0x30f6,0x30fc,0xff1d,0xff3b,0xff3d,0xff5c,0xffe3, // vertical f87e (34) + 0x2026,0xff47,0xff4d, // halfwidth f87f (3) + 0x5927,0x5c0f,0x63a7, // enclosing circle 20dd (3) + 0x21e6,0x21e7,0x21e8,0x21e9, // black arrow f87a (4) +}; + +static int s_form_tbl_len = sizeof(s_form_tbl)/sizeof(unsigned short); + +static const unsigned short s_form_sjis_tbl[] = { + 0xeb5d,0xeb61,0xeb63, + 0xeb41,0xeb42,0xeb60,0xec9f,0xeca1,0xeca3,0xeca5,0xeca7, + 0xecc1,0xece1,0xece3,0xece5,0xecec,0xed40,0xed42,0xed44, + 0xed46,0xed48,0xed62,0xed83,0xed85,0xed87,0xed8e,0xed95, + 0xed96,0xeb5b,0xeb81,0xeb6d,0xeb6e,0xeb62,0xeb50, // vertical + 0x00ff,0x864b,0x8645, // halfwidth + 0x8791,0x8792,0x879d, // enclosing circle + 0x86d4,0x86d5,0x86d3,0x86d6, // black arrow +}; + +static const unsigned short s_form_sjis_fallback_tbl[] = { + 0x815d,0x8161,0x8163, + 0x8141,0x8142,0x8160,0x829f,0x82a1,0x82a3,0x82a5,0x82a7, + 0x82c1,0x82e1,0x82e3,0x82e5,0x82ec,0x8340,0x8342,0x8344, + 0x8346,0x8348,0x8362,0x8383,0x8385,0x8387,0x838e,0x8395, + 0x8396,0x815b,0x8181,0x816d,0x816e,0x8162,0x8150, // vertical + 0x815d,0x8287,0x828d, // halfwidth + 0x91e5,0x8fac,0x8d54, // enclosing circle + 0x86d0,0x86d1,0x86cf,0x86d2, // arrow +}; + +static const unsigned short wchar2sjis_mac_r_tbl[][3] = { + {0x2160, 0x216b, 0x034e}, + {0x2170, 0x217b, 0x0362}, + {0x2460, 0x2473, 0x02f0}, + {0x2474, 0x2487, 0x030e}, + {0x2488, 0x2490, 0x0341}, + {0x249c, 0x24b5, 0x038a}, + {0x2776, 0x277e, 0x032c}, + {0x30f7, 0x30fa, 0x054e}, + {0x32a4, 0x32a9, 0x04ba}, +}; + +static int wchar2sjis_mac_r_tbl_len = sizeof(wchar2sjis_mac_r_tbl)/(3*sizeof(unsigned short)); + +static const unsigned short wchar2sjis_mac_r_map[][2] = { + {0x2660, 0x2667}, + {0x322a, 0x3243}, + {0x3296, 0x329e}, + {0x3300, 0x33d4}, + {0xfe30, 0xfe44}, +}; + +static int wchar2sjis_mac_r_map_len = sizeof(wchar2sjis_mac_r_map)/(2*sizeof(unsigned short)); + +static const unsigned short *wchar2sjis_mac_code_map[] = { + wchar2sjis_mac4, wchar2sjis_mac7, wchar2sjis_mac8, wchar2sjis_mac9, wchar2sjis_mac10}; + +static const unsigned short wchar2sjis_mac_wchar_tbl[][2] = { + {0x2109, 0x03c2}, + {0x2113, 0x03bc}, + {0x2116, 0x0406}, + {0x2121, 0x0408}, + {0x21c4, 0x0437}, + {0x21c5, 0x0438}, + {0x21c6, 0x0436}, + {0x21e6, 0x043b}, + {0x21e7, 0x043c}, + {0x21e8, 0x043a}, + {0x21e9, 0x043d}, + {0x221f, 0x0525}, + {0x222e, 0x0524}, + {0x22bf, 0x0526}, + {0x260e, 0x041f}, + {0x261c, 0x0433}, + {0x261d, 0x0434}, + {0x261e, 0x0432}, + {0x261f, 0x0435}, + {0x3004, 0x0420}, + {0x301d, 0x0538}, + {0x301f, 0x0539}, + {0x3020, 0x041e}, + {0x3094, 0x054c}, +}; + +static int wchar2sjis_mac_wchar_tbl_len = sizeof(wchar2sjis_mac_wchar_tbl)/(2*sizeof(unsigned short)); diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h b/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h index c948dfa16b..b685713142 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h @@ -25,7 +25,9 @@ #ifndef UNICODE_TABLE_CP932_EXT_H #define UNICODE_TABLE_CP932_EXT_H -static const unsigned short cp932ext1_ucs_table[] = { +#ifdef UNICODE_TABLE_CP932_DEF + +const unsigned short cp932ext1_ucs_table[] = { /* ku 13 */ 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, 0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, @@ -40,10 +42,10 @@ static const unsigned short cp932ext1_ucs_table[] = { 0x2261,0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F, 0x22BF,0x2235,0x2229,0x222A,0x0000,0x0000 }; -static const int cp932ext1_ucs_table_min = (13 - 1)*94; -static const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short)); +const int cp932ext1_ucs_table_min = (13 - 1)*94; +const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short)); -static const unsigned short cp932ext2_ucs_table[] = { +const unsigned short cp932ext2_ucs_table[] = { /* ku 89 */ 0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631, 0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00, @@ -100,10 +102,10 @@ static const unsigned short cp932ext2_ucs_table[] = { 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177, 0x2178,0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02 }; -static const int cp932ext2_ucs_table_min = (89 - 1)*94; -static const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short)); +const int cp932ext2_ucs_table_min = (89 - 1)*94; +const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short)); -static const unsigned short cp932ext3_ucs_table[] = { +const unsigned short cp932ext3_ucs_table[] = { /* ku 115 */ 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177, 0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165, @@ -164,7 +166,22 @@ static const unsigned short cp932ext3_ucs_table[] = { 0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00,0x9D70, 0x9D6B,0xFA2D,0x9E19,0x9ED1 }; -static const int cp932ext3_ucs_table_min = (115 - 1)*94; -static const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short)); +const int cp932ext3_ucs_table_min = (115 - 1)*94; +const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short)); + +#else + +extern const unsigned short cp932ext1_ucs_table[]; +extern const unsigned short cp932ext2_ucs_table[]; +extern const unsigned short cp932ext3_ucs_table[]; + +extern const int cp932ext1_ucs_table_min; +extern const int cp932ext1_ucs_table_max; +extern const int cp932ext2_ucs_table_min; +extern const int cp932ext2_ucs_table_max; +extern const int cp932ext3_ucs_table_min; +extern const int cp932ext3_ucs_table_max; + +#endif #endif /* UNICODE_TABLE_CP932_EXT_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp936.h b/ext/mbstring/libmbfl/filters/unicode_table_cp936.h index aa024d1a45..173c8f4b3f 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp936.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_cp936.h @@ -28,8 +28,9 @@ /* * Unicode table */ +#ifdef UNICODE_TABLE_CP936_DEF -static const unsigned short cp936_ucs_table[] = { +const unsigned short cp936_ucs_table[] = { /* 0x8100 */ 0x4e02,0x4e04,0x4e05,0x4e06,0x4e0f,0x4e12,0x4e17,0x4e1f, 0x4e20,0x4e21,0x4e23,0x4e26,0x4e29,0x4e2e,0x4e2f,0x4e31, @@ -876,7 +877,7 @@ static const unsigned short cp936_ucs_table[] = { 0x2477,0x2478,0x2479,0x247a,0x247b,0x247c,0x247d,0x247e, 0x247f,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486, 0x2487,0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466, -0x2467,0x2468,0x2469,0x0000,0x0000,0x3220,0x3221,0x3222, +0x2467,0x2468,0x2469,0x20ac,0x0000,0x3220,0x3221,0x3222, 0x3223,0x3224,0x3225,0x3226,0x3227,0x3228,0x3229,0x0000, 0x0000,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, 0x2167,0x2168,0x2169,0x216a,0x216b,0x0000,0x0000,0x0000, @@ -1021,7 +1022,7 @@ static const unsigned short cp936_ucs_table[] = { 0x0000,0x0101,0x00e1,0x01ce,0x00e0,0x0113,0x00e9,0x011b, 0x00e8,0x012b,0x00ed,0x01d0,0x00ec,0x014d,0x00f3,0x01d2, 0x00f2,0x016b,0x00fa,0x01d4,0x00f9,0x01d6,0x01d8,0x01da, -0x01dc,0x00fc,0x00ea,0x0251,0x0000,0x0144,0x0148,0x0000, +0x01dc,0x00fc,0x00ea,0x0251,0x0000,0x0144,0x0148,0x01f9, 0x0261,0x0000,0x0000,0x0000,0x0000,0x3105,0x3106,0x3107, 0x3108,0x3109,0x310a,0x310b,0x310c,0x310d,0x310e,0x310f, 0x3110,0x3111,0x3112,0x3113,0x3114,0x3115,0x3116,0x3117, @@ -1040,8 +1041,8 @@ static const unsigned short cp936_ucs_table[] = { 0xfe51,0xfe52,0xfe54,0xfe55,0xfe56,0xfe57,0xfe59,0xfe5a, 0xfe5b,0xfe5c,0xfe5d,0xfe5e,0xfe5f,0xfe60,0xfe61,0x0000, 0xfe62,0xfe63,0xfe64,0xfe65,0xfe66,0xfe68,0xfe69,0xfe6a, -0xfe6b,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3007,0x0000, +0xfe6b,0x303e,0x2ff0,0x2ff1,0x2ff2,0x2ff3,0x2ff4,0x2ff5, +0x2ff6,0x2ff7,0x2ff8,0x2ff9,0x2ffa,0x2ffb,0x3007,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x2500,0x2501,0x2502,0x2503, 0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250a,0x250b, @@ -3157,13 +3158,24 @@ static const unsigned short cp936_ucs_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, /* 0xfe00 */ 0xfa0c,0xfa0d,0xfa0e,0xfa0f,0xfa11,0xfa13,0xfa14,0xfa18, -0xfa1f,0xfa20,0xfa21,0xfa23,0xfa24,0xfa27,0xfa28,0xfa29}; +0xfa1f,0xfa20,0xfa21,0xfa23,0xfa24,0xfa27,0xfa28,0xfa29, +0x2e81,0x0000,0x0000,0x0000,0x2e84,0x3473,0x3447,0x2e88, +0x2e8b,0x0000,0x359e,0x361a,0x360e,0x2e8c,0x2e97,0x396e, +0x3918,0x0000,0x39cf,0x39df,0x3a73,0x39d0,0x0000,0x0000, +0x3b4e,0x3c6e,0x3ce0,0x2ea7,0x0000,0x0000,0x2eaa,0x4056, +0x415f,0x2eae,0x4337,0x2eb3,0x2eb6,0x2eb7,0x0000,0x43b1, +0x43ac,0x2ebb,0x43dd,0x44d6,0x4661,0x464c,0x0000,0x0000, +0x4723,0x4729,0x477c,0x478d,0x2eca,0x4947,0x497a,0x497d, +0x4982,0x4983,0x4985,0x4986,0x499f,0x499b,0x49b7,0x49b6, +0x0000,0x0000,0x4ca3,0x4c9f,0x4ca0,0x4ca1,0x4c77,0x4ca2, +0x4d13,0x4d14,0x4d15,0x4d16,0x4d17,0x4d18,0x4d19,0x4dae, +}; -static const int cp936_ucs_table_size = (sizeof(cp936_ucs_table)/sizeof(unsigned short)); +const int cp936_ucs_table_size = (sizeof(cp936_ucs_table)/sizeof(unsigned short)); /* UCS -> CP936 */ -static const unsigned short ucs_a1_cp936_table[] = { +const unsigned short ucs_a1_cp936_table[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3228,7 +3240,7 @@ static const unsigned short ucs_a1_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0xa8bf,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, /* 0x0200 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3308,11 +3320,11 @@ static const unsigned short ucs_a1_cp936_table[] = { 0xa7ea,0xa7eb,0xa7ec,0xa7ed,0xa7ee,0xa7ef,0xa7f0,0xa7f1, 0x0000,0xa7d7}; -static const int ucs_a1_cp936_table_min = 0x0000; -static const int ucs_a1_cp936_table_max = 0x0000 + (sizeof (ucs_a1_cp936_table) / sizeof (unsigned short)); +const int ucs_a1_cp936_table_min = 0x0000; +const int ucs_a1_cp936_table_max = 0x0000 + (sizeof (ucs_a1_cp936_table) / sizeof (unsigned short)); /* 0x2000 */ -static const unsigned short ucs_a2_cp936_table[] = { +const unsigned short ucs_a2_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0xa95c,0x0000,0x0000,0xa843,0xa1aa,0xa844,0xa1ac,0x0000, @@ -3544,10 +3556,10 @@ static const unsigned short ucs_a2_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_a2_cp936_table_min = 0x2000; -static const int ucs_a2_cp936_table_max = 0x2000 + (sizeof (ucs_a2_cp936_table) / sizeof (unsigned short)); +const int ucs_a2_cp936_table_min = 0x2000; +const int ucs_a2_cp936_table_max = 0x2000 + (sizeof (ucs_a2_cp936_table) / sizeof (unsigned short)); -static const unsigned short ucs_a3_cp936_table[] = { +const unsigned short ucs_a3_cp936_table[] = { /* 0x2f00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3579,8 +3591,9 @@ static const unsigned short ucs_a3_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0xa98a,0xa98b,0xa98c,0xa98d,0xa98e,0xa98f,0xa990,0xa991, +0xa992,0xa993,0xa994,0xa995,0x0000,0x0000,0x0000,0x0000, +/* 0x3000 */ 0xa1a1,0xa1a2,0xa1a3,0xa1a8,0x0000,0xa1a9,0xa965,0xa996, 0xa1b4,0xa1b5,0xa1b6,0xa1b7,0xa1b8,0xa1b9,0xa1ba,0xa1bb, 0xa1be,0xa1bf,0xa893,0xa1fe,0xa1b2,0xa1b3,0xa1bc,0xa1bd, @@ -3588,7 +3601,7 @@ static const unsigned short ucs_a3_cp936_table[] = { 0x0000,0xa940,0xa941,0xa942,0xa943,0xa944,0xa945,0xa946, 0xa947,0xa948,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xa989,0x0000, 0x0000,0xa4a1,0xa4a2,0xa4a3,0xa4a4,0xa4a5,0xa4a6,0xa4a7, 0xa4a8,0xa4a9,0xa4aa,0xa4ab,0xa4ac,0xa4ad,0xa4ae,0xa4af, 0xa4b0,0xa4b1,0xa4b2,0xa4b3,0xa4b4,0xa4b5,0xa4b6,0xa4b7, @@ -3714,14 +3727,16 @@ static const unsigned short ucs_a3_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_a3_cp936_table_min = 0x2f00; -static const int ucs_a3_cp936_table_max = 0x2f00 + (sizeof (ucs_a3_cp936_table) / sizeof (unsigned short)); +const int ucs_a3_cp936_table_min = 0x2f00; +const int ucs_a3_cp936_table_max = 0x2f00 + (sizeof (ucs_a3_cp936_table) / sizeof (unsigned short)); /* 4d00h CJK Unified Ideographs (+ Extension A) */ -static const unsigned short ucs_i_cp936_table[] = { +const unsigned short ucs_i_cp936_table[] = { /* 0x4d00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0xfe98,0xfe99,0xfe9a,0xfe9b,0xfe9c, +0xfe9d,0xfe9e,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3739,9 +3754,7 @@ static const unsigned short ucs_i_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xfe9f,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -6377,113 +6390,163 @@ static const unsigned short ucs_i_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; /* 9fffh */ -static const int ucs_i_cp936_table_min = 0x4d00; -static const int ucs_i_cp936_table_max = 0x4d00 + (sizeof (ucs_i_cp936_table) / sizeof (unsigned short)); +const int ucs_i_cp936_table_min = 0x4d00; +const int ucs_i_cp936_table_max = 0x4d00 + (sizeof (ucs_i_cp936_table) / sizeof (unsigned short)); +/* 0xf900 CJK Compatibility Ideographs (with fallback) */ +static const unsigned short ucs_ci_cp936_table[] = { // 0xf900 - 0xfa2f -/* 0xf900 CJK Compatibility Ideographs */ -static const unsigned short ucs_ci_cp936_table[] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0xfd9c,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0xfd9d,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0xfd9e,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xfd9f, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0xfda0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -/* 0xfa00 */ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0xfe40,0xfe41,0xfe42,0xfe43, -0x0000,0xfe44,0x0000,0xfe45,0xfe46,0x0000,0x0000,0x0000, -0xfe47,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xfe48, -0xfe49,0xfe4a,0x0000,0xfe4b,0xfe4c,0x0000,0x0000,0xfe4d, -0xfe4e,0xfe4f,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; -static const int ucs_ci_cp936_table_min = 0xf900; -static const int ucs_ci_cp936_table_max = 0xf900 + (sizeof (ucs_ci_cp936_table) / sizeof (unsigned short)); +/* F900h */ +0xD84D,0xB8FC,0xDC87,0xD95A,0xBBAC,0xB4AE,0xBEE4,0xFD94, +0xFD94,0xC6F5,0xBDF0,0xC0AE,0xC4CE,0x91D0,0xB05D,0xC15F, +0xCC7D,0xC2DD,0xC2E3,0xDF89,0x98B7,0xC2E5,0xC0D3,0xE7F3, +0xC2E4,0xC0D2,0xF198,0x8179,0xC2D1,0x99DA,0xA080,0xCC6D, +0xFB5B,0x8DB9,0x9E45,0xCB7B,0xD268,0xC0AD,0xC544,0xCF9E, +0xC0C8,0xC0CA,0xC0CB,0xC0C7,0xFD9C,0x81ED,0xC0E4,0x84DA, +0x93EF,0x99A9,0xA074,0xB152,0xC0CF,0xCC4A,0xCC94,0xC2B7, +0xC2B6,0xF494,0xFA98,0xC2B5,0xB593,0xBE47,0xC78A,0xE49B, +0xC2B9,0xD593,0x89C5,0xC5AA,0xBB5C,0xC340,0xC0CE,0xC0DA, +0xD954,0xC0D7,0x89BE,0x8CD2,0x98C7,0x9C49,0xC2A9,0xC0DB, +0xBF7C,0xC2AA,0xC0D5,0xC0DF,0x8443,0xC1E8,0xB6A0,0xBE63, +0xC1E2,0xC1EA,0xD778,0x9282,0x98B7,0xD65A,0xB5A4,0x8C8E, +0xC5AD,0xC2CA,0xAE90,0xB1B1,0xB491,0xB1E3,0x8FCD,0xB2BB, +0xC3DA,0x94B5,0xCBF7,0x85A2,0xC8FB,0xCAA1,0xC87E,0xD566, +0x9AA2,0xB3BD,0xC9F2,0xCAB0,0xC8F4,0xC2D3,0xC2D4,0xC1C1, +0x83C9,0xFD9D,0xC1BA,0xBC5A,0xC1BC,0xD58F,0xC1BF,0x84EE, +0x85CE,0xC5AE,0x8F5D,0xC2C3,0x9E56,0xB55A,0xE982,0xF350, +0xFB90,0xC0E8,0xC1A6,0x95D1,0x9A76,0xDE5D,0xC4EA,0x917A, +0x91D9,0x93D3,0x9D69,0x9F92,0xAD49,0xFD9E,0xBE9A,0xC293, +0xDD82,0xC98F,0xDF42,0xE580,0xC1D0,0xC1D3,0xD1CA,0xC1D2, +0xC1D1,0xD566,0xC1AE,0xC4EE,0xC4ED,0x9A9A,0xBA9F,0xAB43, +0xC1EE,0xE0F2,0x8C8E,0x8E58,0xC1AF,0xC1E1,0xAC93,0xC1E7, +0xF1F6,0xE28F,0xC1E3,0xEC60,0xEE49,0xC0FD,0xB659,0xF5B7, +0xEB60,0x90BA,0xC1CB,0xC1C5,0xE5BC,0xC4F2,0xC1CF,0x98B7, +0xC1C7,0xAF9F,0xDEA4,0xDF7C,0xFD88,0x959E,0xC8EE,0x84A2, +0x9683,0xC1F8,0xC1F7,0xC1EF,0xC1F0,0xC1F4,0xC1F2,0xBC7E, +0xEE90,0xC1F9,0xC2BE,0xEA91,0x8290,0x8D91,0x9C53,0xDD86, +0xC2C9,0x90FC,0xC0F5,0xC2CA,0xC2A1,0xC0FB,0xC0F4,0xC2C4, +0xD2D7,0xC0EE,0xC0E6,0xC4E0,0xC0ED,0xC1A1,0xEEBE,0xFD9F, +0xD165,0xC0EF,0xEB78,0xC4E4,0xC4E7,0xC1DF,0x9FFB,0xAD55, +0xCC41,0xFDA0,0xF75B,0xF7EB,0xC1D6,0xC1DC,0xC552,0xC1A2, +0xF3D2,0xC1A3,0xA0EE,0xD6CB,0xD752,0xCAB2,0xB2E8,0xB4CC, + +/* FA00h */ +0xC7D0,0xB6C8,0xCDD8,0xCCC7,0xD5AC,0xB6B4,0xB1A9,0xDD97, +0xD0D0,0xBDB5,0xD28A,0xC0AA,0xFE40,0xFE41,0xFE42,0xFE43, +0x8956,0xFE44,0xC7E7,0xFE45,0xFE46,0x8444,0xD869,0xD2E6, +0xFE47,0xC9F1,0xCFE9,0xB8A3,0xBEB8,0xBEAB,0xD3F0,0xFE48, +0xFE49,0xFE4A,0xD654,0xFE4B,0xFE4C,0xD2DD,0xB6BC,0xFE4D, +0xFE4E,0xFE4F,0xEF88,0xEF95,0xF05E,0xFA51,0x0000,0x0000, +}; + +const int ucs_ci_cp936_table_min = 0xf900; +const int ucs_ci_cp936_table_max = 0xfa2f; +/* reduced map for GBK: U+FA0C - U+FA29 */ +const unsigned short ucs_ci_s_cp936_table[] = { + 0xfe40,0xfe41,0xfe42,0xfe43, + 0x0000,0xfe44,0x0000,0xfe45,0xfe46,0x0000,0x0000,0x0000, + 0xfe47,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xfe48, + 0xfe49,0xfe4a,0x0000,0xfe4b,0xfe4c,0x0000,0x0000,0xfe4d, + 0xfe4e,0xfe4f}; /* FE30h CJK Compatibility Forms */ -static const unsigned short ucs_cf_cp936_table[] = { +const unsigned short ucs_cf_cp936_table[] = { 0xa955,0xa6f2,0x0000,0xa6f4,0xa6f5,0xa6e0,0xa6e1,0xa6f0, 0xa6f1,0xa6e2,0xa6e3,0xa6ee,0xa6ef,0xa6e6,0xa6e7,0xa6e4, 0xa6e5,0xa6e8,0xa6e9,0xa6ea,0xa6eb,0x0000,0x0000,0x0000, 0x0000,0xa968,0xa969,0xa96a,0xa96b,0xa96c,0xa96d,0xa96e}; -static const int ucs_cf_cp936_table_min = 0xfe30; -static const int ucs_cf_cp936_table_max = 0xfe30 + (sizeof (ucs_cf_cp936_table) / sizeof (unsigned short)); +const int ucs_cf_cp936_table_min = 0xfe30; +const int ucs_cf_cp936_table_max = 0xfe30 + (sizeof (ucs_cf_cp936_table) / sizeof (unsigned short)); /* FE50h Small Form Variants */ -static const unsigned short ucs_sfv_cp936_table[] = { +const unsigned short ucs_sfv_cp936_table[] = { 0xa96f,0xa970,0xa971,0x0000,0xa972,0xa973,0xa974,0xa975, 0x0000,0xa976,0xa977,0xa978,0xa979,0xa97a,0xa97b,0xa97c, 0xa97d,0xa97e,0xa980,0xa981,0xa982,0xa983,0xa984,0x0000, 0xa985,0xa986,0xa987,0xa988,0x0000,0x0000,0x0000,0x0000}; -static const int ucs_sfv_cp936_table_min = 0xfe50; -static const int ucs_sfv_cp936_table_max = 0xfe50 + (sizeof (ucs_sfv_cp936_table) / sizeof (unsigned short)); +const int ucs_sfv_cp936_table_min = 0xfe50; +const int ucs_sfv_cp936_table_max = 0xfe50 + (sizeof (ucs_sfv_cp936_table) / sizeof (unsigned short)); /* FF00h Halfwidth and Fullwidth Forms */ -static const unsigned short ucs_hff_cp936_table[] = { -0x0000,0xa3a1,0xa3a2,0xa3a3,0xa1e7,0xa3a5,0xa3a6,0xa3a7, -0xa3a8,0xa3a9,0xa3aa,0xa3ab,0xa3ac,0xa3ad,0xa3ae,0xa3af, -0xa3b0,0xa3b1,0xa3b2,0xa3b3,0xa3b4,0xa3b5,0xa3b6,0xa3b7, -0xa3b8,0xa3b9,0xa3ba,0xa3bb,0xa3bc,0xa3bd,0xa3be,0xa3bf, -0xa3c0,0xa3c1,0xa3c2,0xa3c3,0xa3c4,0xa3c5,0xa3c6,0xa3c7, -0xa3c8,0xa3c9,0xa3ca,0xa3cb,0xa3cc,0xa3cd,0xa3ce,0xa3cf, -0xa3d0,0xa3d1,0xa3d2,0xa3d3,0xa3d4,0xa3d5,0xa3d6,0xa3d7, -0xa3d8,0xa3d9,0xa3da,0xa3db,0xa3dc,0xa3dd,0xa3de,0xa3df, -0xa3e0,0xa3e1,0xa3e2,0xa3e3,0xa3e4,0xa3e5,0xa3e6,0xa3e7, -0xa3e8,0xa3e9,0xa3ea,0xa3eb,0xa3ec,0xa3ed,0xa3ee,0xa3ef, -0xa3f0,0xa3f1,0xa3f2,0xa3f3,0xa3f4,0xa3f5,0xa3f6,0xa3f7, -0xa3f8,0xa3f9,0xa3fa,0xa3fb,0xa3fc,0xa3fd,0xa1ab,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xa1e9,0xa1ea,0xa956,0xa3fe,0xa957,0xa3a4,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 + +/* reduced map: U+FFE0 - U+FFE5 */ +const unsigned short ucs_hff_s_cp936_table[] = { + 0xa1e9,0xa1ea,0xa956,0xa3fe,0xa957,0xa3a4, }; -static const int ucs_hff_cp936_table_min = 0xff00; -static const int ucs_hff_cp936_table_max = 0xff00 + (sizeof (ucs_hff_cp936_table) / sizeof (unsigned short)); + +const int ucs_hff_cp936_table_min = 0xff00; +const int ucs_hff_cp936_table_max = 0xffff; + +/* CP936 local */ + +static const unsigned short mbfl_cp936_pua_tbl[][3] = { + {0xe766, 0xe76b, 0xa2ab}, + {0xe76c, 0xe76d, 0xa2e3}, + {0xe76e, 0xe76f, 0xa2ef}, + {0xe770, 0xe771, 0xa2fd}, + {0xe772, 0xe77c, 0xa4f4}, + {0xe77d, 0xe784, 0xa5f7}, + {0xe785, 0xe78c, 0xa6b9}, + {0xe78d, 0xe793, 0xa6d9}, + {0xe794, 0xe795, 0xa6ec}, + {0xe796, 0xe796, 0xa6f3}, + {0xe797, 0xe79f, 0xa6f6}, + {0xe7a0, 0xe7ae, 0xa7c2}, + {0xe7af, 0xe7bb, 0xa7f2}, + {0xe7bc, 0xe7c6, 0xa896}, + {0xe7c7, 0xe7c7, 0xa8bc}, + {0xe7c8, 0xe7c8, 0xa8bf}, + {0xe7c9, 0xe7cc, 0xa8c1}, + {0xe7cd, 0xe7e1, 0xa8ea}, + {0xe7e2, 0xe7e2, 0xa958}, + {0xe7e3, 0xe7e3, 0xa95b}, + {0xe7e4, 0xe7e6, 0xa95d}, + {0xe7e7, 0xe7f3, 0xa989}, + {0xe7f4, 0xe800, 0xa997}, + {0xe801, 0xe80f, 0xa9f0}, + {0xe810, 0xe814, 0xd7fa}, + {0xe815, 0xe843, 0xfe50}, + {0xe844, 0xe864, 0xfe80}, +}; + +static const int mbfl_cp936_pua_tbl_max = sizeof(mbfl_cp936_pua_tbl)/(sizeof(unsigned short)*3); + +#else + +extern const unsigned short cp936_ucs_table[]; +extern const unsigned short ucs_a1_cp936_table[]; +extern const unsigned short ucs_a2_cp936_table[]; +extern const unsigned short ucs_a3_cp936_table[]; +extern const unsigned short ucs_i_cp936_table[]; +extern const unsigned short ucs_cf_cp936_table[]; +extern const unsigned short ucs_sfv_cp936_table[]; + +extern const unsigned short ucs_ci_s_cp936_table[]; +extern const unsigned short ucs_hff_s_cp936_table[]; + +extern const int cp936_ucs_table_size; +extern const int ucs_a1_cp936_table_min; +extern const int ucs_a1_cp936_table_max; +extern const int ucs_a2_cp936_table_min; +extern const int ucs_a2_cp936_table_max; +extern const int ucs_a3_cp936_table_min; +extern const int ucs_a3_cp936_table_max; +extern const int ucs_i_cp936_table_min; +extern const int ucs_i_cp936_table_max; +extern const int ucs_ci_cp936_table_min; +extern const int ucs_ci_cp936_table_max; +extern const int ucs_cf_cp936_table_min; +extern const int ucs_cf_cp936_table_max; +extern const int ucs_sfv_cp936_table_min; +extern const int ucs_sfv_cp936_table_max; +extern const int ucs_hff_cp936_table_min; +extern const int ucs_hff_cp936_table_max; + +#endif #endif /* UNICODE_TABLE_CP936_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_gb18030.h b/ext/mbstring/libmbfl/filters/unicode_table_gb18030.h new file mode 100644 index 0000000000..7c38045638 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/unicode_table_gb18030.h @@ -0,0 +1,233 @@ +/* + * "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: Rui Hirokawa <hirokawa@php.net> + * + */ + +#ifndef UNICODE_TABLE_GB18030_H +#define UNICODE_TABLE_GB18030_H + +static const unsigned short mbfl_gb18030_c_tbl_val[58] = +{ + 0xfe50,0xfe54,0xfe57,0xfe58,0xfe5d,0xfe5e,0xfe6b,0xfe6e, + 0xfe71,0xfe73,0xfe74,0xfe75,0xfe79,0xfe84,0xfe56,0xfe55, + 0xfe5a,0xfe5c,0xfe5b,0xfe60,0xfe5f,0xfe62,0xfe65,0xfe63, + 0xfe64,0xfe68,0xfe69,0xfe6a,0xfe6f,0xfe70,0xfe72,0xfe78, + 0xfe77,0xfe7a,0xfe7b,0xfe7d,0xfe7c,0xfe80,0xfe81,0xfe82, + 0xfe83,0xfe85,0xfe86,0xfe87,0xfe88,0xfe89,0xfe8a,0xfe8b, + 0xfe8d,0xfe8c,0xfe8f,0xfe8e,0xfe96,0xfe93,0xfe94,0xfe95, + 0xfe97,0xfe92, +}; + +static const unsigned short mbfl_gb18030_c_tbl_key[58] = +{ + 0x2e81,0x2e84,0x2e88,0x2e8b,0x2e8c,0x2e97,0x2ea7,0x2eaa, + 0x2eae,0x2eb3,0x2eb6,0x2eb7,0x2ebb,0x2eca,0x3447,0x3473, + 0x359e,0x360e,0x361a,0x3918,0x396e,0x39cf,0x39d0,0x39df, + 0x3a73,0x3b4e,0x3c6e,0x3ce0,0x4056,0x415f,0x4337,0x43ac, + 0x43b1,0x43dd,0x44d6,0x464c,0x4661,0x4723,0x4729,0x477c, + 0x478d,0x4947,0x497a,0x497d,0x4982,0x4983,0x4985,0x4986, + 0x499b,0x499f,0x49b6,0x49b7,0x4c77,0x4c9f,0x4ca0,0x4ca1, + 0x4ca2,0x4ca3, +}; + +static const int mbfl_gb18030_c_tbl_max = sizeof(mbfl_gb18030_c_tbl_key)/sizeof(unsigned short); + +static const unsigned short mbfl_gb18030_pua_tbl[][3] = { + {0xe766, 0xe76b, 0xa2ab}, + {0xe76d, 0xe76d, 0xa2e4}, + {0xe76e, 0xe76f, 0xa2ef}, + {0xe770, 0xe771, 0xa2fd}, + {0xe772, 0xe77c, 0xa4f4}, + {0xe77d, 0xe784, 0xa5f7}, + {0xe785, 0xe78c, 0xa6b9}, + {0xe78d, 0xe793, 0xa6d9}, + {0xe794, 0xe795, 0xa6ec}, + {0xe796, 0xe796, 0xa6f3}, + {0xe797, 0xe79f, 0xa6f6}, + {0xe7a0, 0xe7ae, 0xa7c2}, + {0xe7af, 0xe7bb, 0xa7f2}, + {0xe7bc, 0xe7c6, 0xa896}, + {0xe7c7, 0xe7c7, 0xa8bc}, + {0xe7c9, 0xe7cc, 0xa8c1}, + {0xe7cd, 0xe7e1, 0xa8ea}, + {0xe7e2, 0xe7e2, 0xa958}, + {0xe7e3, 0xe7e3, 0xa95b}, + {0xe7e4, 0xe7e6, 0xa95d}, + {0xe7f4, 0xe800, 0xa997}, + {0xe801, 0xe80f, 0xa9f0}, + {0xe810, 0xe814, 0xd7fa}, + {0xe816, 0xe818, 0xfe51}, + {0xe81e, 0xe81e, 0xfe59}, + {0xe826, 0xe826, 0xfe61}, + {0xe82b, 0xe82c, 0xfe66}, + {0xe831, 0xe832, 0xfe6c}, + {0xe83b, 0xe83b, 0xfe76}, + {0xe843, 0xe843, 0xfe7e}, + {0xe854, 0xe855, 0xfe90}, + {0xe864, 0xe864, 0xfea0}, +}; + +static const int mbfl_gb18030_pua_tbl_max = sizeof(mbfl_gb18030_pua_tbl)/(sizeof(unsigned short)*3); + +static const unsigned short mbfl_gb2uni_tbl[] = { +0x0000, 0x0023, 0x0024, 0x0025, 0x0026, 0x002c, 0x002d, 0x0031, +0x0032, 0x0050, 0x0051, 0x0058, 0x0059, 0x005e, 0x005f, 0x005f, +0x0060, 0x0063, 0x0064, 0x0066, 0x0067, 0x0067, 0x0068, 0x0068, +0x0069, 0x006c, 0x006d, 0x007d, 0x007e, 0x0084, 0x0085, 0x0093, +0x0094, 0x00ab, 0x00ac, 0x00ae, 0x00af, 0x00b2, 0x00b3, 0x00cf, +0x00d0, 0x0131, 0x0132, 0x0132, 0x0133, 0x0133, 0x0134, 0x0134, +0x0135, 0x0135, 0x0136, 0x0136, 0x0137, 0x0137, 0x0138, 0x0138, +0x0139, 0x0154, 0x0155, 0x01ab, 0x01ac, 0x01ba, 0x01bb, 0x021f, +0x0220, 0x0220, 0x0221, 0x022d, 0x022e, 0x02e4, 0x02e5, 0x02e5, +0x02e6, 0x02ec, 0x02ed, 0x02ed, 0x02ee, 0x0324, 0x0325, 0x0332, +0x0333, 0x0333, 0x0334, 0x1ef1, 0x1ef2, 0x1ef3, 0x1ef4, 0x1ef4, +0x1ef5, 0x1ef6, 0x1ef7, 0x1efd, 0x1efe, 0x1f06, 0x1f07, 0x1f07, +0x1f08, 0x1f08, 0x1f09, 0x1f0d, 0x1f0e, 0x1f7d, 0x1f7e, 0x1fd3, +0x1fd4, 0x1fd4, 0x1fd5, 0x1fd7, 0x1fd8, 0x1fe3, 0x1fe4, 0x1fed, +0x1fee, 0x202b, 0x202c, 0x202f, 0x2030, 0x2045, 0x2046, 0x2047, +0x2048, 0x20b5, 0x20b6, 0x20bb, 0x20bc, 0x20bc, 0x20bd, 0x20bf, +0x20c0, 0x20c3, 0x20c4, 0x20c5, 0x20c6, 0x20c7, 0x20c8, 0x20c8, +0x20c9, 0x20c9, 0x20ca, 0x20cb, 0x20cc, 0x20d0, 0x20d1, 0x20d5, +0x20d6, 0x20df, 0x20e0, 0x20e2, 0x20e3, 0x20e7, 0x20e8, 0x20f4, +0x20f5, 0x20f6, 0x20f7, 0x20fc, 0x20fd, 0x2121, 0x2122, 0x2124, +0x2125, 0x212f, 0x2130, 0x2148, 0x2149, 0x219a, 0x219b, 0x22e7, +0x22e8, 0x22f1, 0x22f2, 0x2355, 0x2356, 0x2359, 0x235a, 0x2366, +0x2367, 0x2369, 0x236a, 0x2373, 0x2374, 0x2383, 0x2384, 0x238b, +0x238c, 0x2393, 0x2394, 0x2396, 0x2397, 0x2398, 0x2399, 0x23aa, +0x23ab, 0x23c9, 0x23ca, 0x23cb, 0x23cc, 0x2401, 0x2402, 0x2402, +0x2403, 0x2c40, 0x2c41, 0x2c42, 0x2c43, 0x2c45, 0x2c46, 0x2c47, +0x2c48, 0x2c51, 0x2c52, 0x2c60, 0x2c61, 0x2c62, 0x2c63, 0x2c65, +0x2c66, 0x2c69, 0x2c6a, 0x2c6b, 0x2c6c, 0x2c6e, 0x2c6f, 0x2c7c, +0x2c7d, 0x2da1, 0x2da2, 0x2da5, 0x2da6, 0x2da6, 0x2da7, 0x2dab, +0x2dac, 0x2dad, 0x2dae, 0x2dc1, 0x2dc2, 0x2dc3, 0x2dc4, 0x2dca, +0x2dcb, 0x2dcc, 0x2dcd, 0x2dd1, 0x2dd2, 0x2dd7, 0x2dd8, 0x2ecd, +0x2ece, 0x2ed4, 0x2ed5, 0x2f45, 0x2f46, 0x302f, 0x3030, 0x303b, +0x303c, 0x303d, 0x303e, 0x305f, 0x3060, 0x3068, 0x3069, 0x306a, +0x306b, 0x306c, 0x306d, 0x30dd, 0x30de, 0x3108, 0x3109, 0x3232, +0x3233, 0x32a1, 0x32a2, 0x32ac, 0x32ad, 0x35a9, 0x35aa, 0x35fe, +0x35ff, 0x365e, 0x365f, 0x366c, 0x366d, 0x36ff, 0x3700, 0x37d9, +0x37da, 0x38f8, 0x38f9, 0x3969, 0x396a, 0x3cde, 0x3cdf, 0x3de6, +0x3de7, 0x3fbd, 0x3fbe, 0x4031, 0x4032, 0x4035, 0x4036, 0x4060, +0x4061, 0x4158, 0x4159, 0x42cd, 0x42ce, 0x42e1, 0x42e2, 0x43a2, +0x43a3, 0x43a7, 0x43a8, 0x43f9, 0x43fa, 0x4409, 0x440a, 0x45c2, +0x45c3, 0x45f4, 0x45f5, 0x45f6, 0x45f7, 0x45fa, 0x45fb, 0x45fb, +0x45fc, 0x460f, 0x4610, 0x4612, 0x4613, 0x4628, 0x4629, 0x48e7, +0x48e8, 0x490e, 0x490f, 0x497d, 0x497e, 0x4a11, 0x4a12, 0x4a62, +0x4a63, 0x82bc, 0x82bd, 0x82bd, 0x82be, 0x82be, 0x82bf, 0x82cb, +0x82cc, 0x82cc, 0x82cd, 0x82d1, 0x82d2, 0x82d8, 0x82d9, 0x82dc, +0x82dd, 0x82e0, 0x82e1, 0x82e8, 0x82e9, 0x82ef, 0x82f0, 0x82ff, +0x8300, 0x830d, 0x830e, 0x93d4, 0x93d5, 0x9420, 0x9421, 0x943b, +0x943c, 0x948c, 0x948d, 0x9495, 0x9496, 0x94af, 0x94b0, 0x94b0, +0x94b1, 0x94b1, 0x94b2, 0x94b4, 0x94b5, 0x94ba, 0x94bb, 0x94bb, +0x94bc, 0x94bd, 0x94be, 0x98c3, 0x98c4, 0x98c4, 0x98c5, 0x98c8, +0x98c9, 0x98c9, 0x98ca, 0x98ca, 0x98cb, 0x98cb, 0x98cc, 0x9960, +0x9961, 0x99e1, 0x99e2, 0x99fb, +}; + +static const unsigned short mbfl_uni2gb_tbl[] = { +0x0080, 0x00a3, 0x00a5, 0x00a6, 0x00a9, 0x00af, 0x00b2, 0x00b6, +0x00b8, 0x00d6, 0x00d8, 0x00df, 0x00e2, 0x00e7, 0x00eb, 0x00eb, +0x00ee, 0x00f1, 0x00f4, 0x00f6, 0x00f8, 0x00f8, 0x00fb, 0x00fb, +0x00fd, 0x0100, 0x0102, 0x0112, 0x0114, 0x011a, 0x011c, 0x012a, +0x012c, 0x0143, 0x0145, 0x0147, 0x0149, 0x014c, 0x014e, 0x016a, +0x016c, 0x01cd, 0x01cf, 0x01cf, 0x01d1, 0x01d1, 0x01d3, 0x01d3, +0x01d5, 0x01d5, 0x01d7, 0x01d7, 0x01d9, 0x01d9, 0x01db, 0x01db, +0x01dd, 0x01f8, 0x01fa, 0x0250, 0x0252, 0x0260, 0x0262, 0x02c6, +0x02c8, 0x02c8, 0x02cc, 0x02d8, 0x02da, 0x0390, 0x03a2, 0x03a2, +0x03aa, 0x03b0, 0x03c2, 0x03c2, 0x03ca, 0x0400, 0x0402, 0x040f, +0x0450, 0x0450, 0x0452, 0x200f, 0x2011, 0x2012, 0x2017, 0x2017, +0x201a, 0x201b, 0x201e, 0x2024, 0x2027, 0x202f, 0x2031, 0x2031, +0x2034, 0x2034, 0x2036, 0x203a, 0x203c, 0x20ab, 0x20ad, 0x2102, +0x2104, 0x2104, 0x2106, 0x2108, 0x210a, 0x2115, 0x2117, 0x2120, +0x2122, 0x215f, 0x216c, 0x216f, 0x217a, 0x218f, 0x2194, 0x2195, +0x219a, 0x2207, 0x2209, 0x220e, 0x2210, 0x2210, 0x2212, 0x2214, +0x2216, 0x2219, 0x221b, 0x221c, 0x2221, 0x2222, 0x2224, 0x2224, +0x2226, 0x2226, 0x222c, 0x222d, 0x222f, 0x2233, 0x2238, 0x223c, +0x223e, 0x2247, 0x2249, 0x224b, 0x224d, 0x2251, 0x2253, 0x225f, +0x2262, 0x2263, 0x2268, 0x226d, 0x2270, 0x2294, 0x2296, 0x2298, +0x229a, 0x22a4, 0x22a6, 0x22be, 0x22c0, 0x2311, 0x2313, 0x245f, +0x246a, 0x2473, 0x249c, 0x24ff, 0x254c, 0x254f, 0x2574, 0x2580, +0x2590, 0x2592, 0x2596, 0x259f, 0x25a2, 0x25b1, 0x25b4, 0x25bb, +0x25be, 0x25c5, 0x25c8, 0x25ca, 0x25cc, 0x25cd, 0x25d0, 0x25e1, +0x25e6, 0x2604, 0x2607, 0x2608, 0x260a, 0x263f, 0x2641, 0x2641, +0x2643, 0x2e80, 0x2e82, 0x2e83, 0x2e85, 0x2e87, 0x2e89, 0x2e8a, +0x2e8d, 0x2e96, 0x2e98, 0x2ea6, 0x2ea8, 0x2ea9, 0x2eab, 0x2ead, +0x2eaf, 0x2eb2, 0x2eb4, 0x2eb5, 0x2eb8, 0x2eba, 0x2ebc, 0x2ec9, +0x2ecb, 0x2fef, 0x2ffc, 0x2fff, 0x3004, 0x3004, 0x3018, 0x301c, +0x301f, 0x3020, 0x302a, 0x303d, 0x303f, 0x3040, 0x3094, 0x309a, +0x309f, 0x30a0, 0x30f7, 0x30fb, 0x30ff, 0x3104, 0x312a, 0x321f, +0x322a, 0x3230, 0x3232, 0x32a2, 0x32a4, 0x338d, 0x3390, 0x339b, +0x339f, 0x33a0, 0x33a2, 0x33c3, 0x33c5, 0x33cd, 0x33cf, 0x33d0, +0x33d3, 0x33d4, 0x33d6, 0x3446, 0x3448, 0x3472, 0x3474, 0x359d, +0x359f, 0x360d, 0x360f, 0x3619, 0x361b, 0x3917, 0x3919, 0x396d, +0x396f, 0x39ce, 0x39d1, 0x39de, 0x39e0, 0x3a72, 0x3a74, 0x3b4d, +0x3b4f, 0x3c6d, 0x3c6f, 0x3cdf, 0x3ce1, 0x4055, 0x4057, 0x415e, +0x4160, 0x4336, 0x4338, 0x43ab, 0x43ad, 0x43b0, 0x43b2, 0x43dc, +0x43de, 0x44d5, 0x44d7, 0x464b, 0x464d, 0x4660, 0x4662, 0x4722, +0x4724, 0x4728, 0x472a, 0x477b, 0x477d, 0x478c, 0x478e, 0x4946, +0x4948, 0x4979, 0x497b, 0x497c, 0x497e, 0x4981, 0x4984, 0x4984, +0x4987, 0x499a, 0x499c, 0x499e, 0x49a0, 0x49b5, 0x49b8, 0x4c76, +0x4c78, 0x4c9e, 0x4ca4, 0x4d12, 0x4d1a, 0x4dad, 0x4daf, 0x4dff, +0x9fa6, 0xd7ff, 0xe76c, 0xe76c, 0xe7c8, 0xe7c8, 0xe7e7, 0xe7f3, +0xe815, 0xe815, 0xe819, 0xe81d, 0xe81f, 0xe825, 0xe827, 0xe82a, +0xe82d, 0xe830, 0xe833, 0xe83a, 0xe83c, 0xe842, 0xe844, 0xe853, +0xe856, 0xe863, 0xe865, 0xf92b, 0xf92d, 0xf978, 0xf97a, 0xf994, +0xf996, 0xf9e6, 0xf9e8, 0xf9f0, 0xf9f2, 0xfa0b, 0xfa10, 0xfa10, +0xfa12, 0xfa12, 0xfa15, 0xfa17, 0xfa19, 0xfa1e, 0xfa22, 0xfa22, +0xfa25, 0xfa26, 0xfa2a, 0xfe2f, 0xfe32, 0xfe32, 0xfe45, 0xfe48, +0xfe53, 0xfe53, 0xfe58, 0xfe58, 0xfe67, 0xfe67, 0xfe6c, 0xff00, +0xff5f, 0xffdf, 0xffe6, 0xffff, +}; + +static const unsigned short mbfl_gb_uni_ofst[] = { + 128, 129, 131, 133, 134, 135, 137, 140, + 142, 144, 145, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, + 168, 171, 172, 189, 196, 213, 220, 221, + 285, 286, 287, 291, 293, 295, 297, 298, + 300, 301, 302, 303, 304, 305, 306, 307, + 308, 320, 330, 334, 338, 339, 340, 341, + 342, 343, 347, 348, 349, 354, 355, 359, + 360, 361, 362, 363, 365, 369, 371, 372, + 373, 374, 375, 376, 386, 426, 502, 538, + 553, 556, 558, 560, 562, 564, 565, 567, + 571, 573, 574, 575, 576, 577, 578, 579, + 581, 582, 583, 584, 585, 586, 588, 589, + 590, 602, 606, 625, 627, 636, 637, 720, + 724, 810, 813, 850, 860, 861, 862, 864, + 867, 868, 869, 870, 872, 873, 874, 875, + 876, 877, 878, 879, 880, 882, 883, 884, + 885, 886, 887, 888, 889, 890, 891, 892, + 893, 894, 895, 896, 897, 898, 899, 900, + 901, 902, 903, 905, 907, 908, 909, 911, + 912, 917, 924, 925, 21827, 25775, 25866, 25896, + 25929, 25932, 25933, 25934, 25936, 25938, 25939, 25940, + 25942, 25943, 25944, 25945, 25946, 25947, 25948, 25952, + 25953, 25955, 25956, 25959, 25961, 25964, 25966, 25984, + 25994, 25998, 26012, 26016, 26110, 26116, +}; + +static const int mbfl_gb_uni_max = sizeof(mbfl_gb_uni_ofst)/sizeof(unsigned short); + + +#endif /* UNICODE_TABLE_GB18030_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_jis.h b/ext/mbstring/libmbfl/filters/unicode_table_jis.h index 5671c4e851..9132d4b33c 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_jis.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_jis.h @@ -27,10 +27,12 @@ #ifndef UNICODE_TABLE_JIS_H #define UNICODE_TABLE_JIS_H +#ifdef UNICODE_TABLE_JIS_DEF + /* * Unicode table */ -static const unsigned short jisx0208_ucs_table[] = { +const unsigned short jisx0208_ucs_table[] = { /* ku 1 */ 0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, @@ -1197,9 +1199,9 @@ static const unsigned short jisx0208_ucs_table[] = { 0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199 }; -static const int jisx0208_ucs_table_size = (sizeof (jisx0208_ucs_table) / sizeof (unsigned short)); +const int jisx0208_ucs_table_size = (sizeof (jisx0208_ucs_table) / sizeof (unsigned short)); -static const unsigned short jisx0212_ucs_table[] = { +const unsigned short jisx0212_ucs_table[] = { /* ku 1 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -2276,9 +2278,9 @@ static const unsigned short jisx0212_ucs_table[] = { 0x9FA2,0x9FA3,0x9FA5 }; -static const int jisx0212_ucs_table_size = (sizeof (jisx0212_ucs_table) / sizeof (unsigned short)); +const int jisx0212_ucs_table_size = (sizeof (jisx0212_ucs_table) / sizeof (unsigned short)); -static const unsigned short ucs_a1_jis_table[] = { +const unsigned short ucs_a1_jis_table[] = { /* 0000h */ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, @@ -2429,11 +2431,11 @@ static const unsigned short ucs_a1_jis_table[] = { 0x0000,0x2757,0xA7F2,0xA7F3,0xA7F4,0xA7F5,0xA7F6,0xA7F7, 0xA7F8,0xA7F9,0xA7FA,0xA7FB,0xA7FC,0x0000,0xA7FD,0xA7FE }; -static const int ucs_a1_jis_table_min = 0x0000; -static const int ucs_a1_jis_table_max = 0x0000 + (sizeof (ucs_a1_jis_table) / sizeof (unsigned short)); +const int ucs_a1_jis_table_min = 0x0000; +const int ucs_a1_jis_table_max = 0x0000 + (sizeof (ucs_a1_jis_table) / sizeof (unsigned short)); -static const unsigned short ucs_a2_jis_table[] = { +const unsigned short ucs_a2_jis_table[] = { /* 2000h */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3012,11 +3014,11 @@ static const unsigned short ucs_a2_jis_table[] = { 0x2570,0x2571,0x2572,0x2573,0x2574,0x2575,0x2576,0x0000, 0x0000,0x0000,0x0000,0x2126,0x213C,0x2133,0x2134,0x0000 }; -static const int ucs_a2_jis_table_min = 0x2000; -static const int ucs_a2_jis_table_max = 0x2000 + (sizeof (ucs_a2_jis_table) / sizeof (unsigned short)); +const int ucs_a2_jis_table_min = 0x2000; +const int ucs_a2_jis_table_max = 0x2000 + (sizeof (ucs_a2_jis_table) / sizeof (unsigned short)); -static const unsigned short ucs_i_jis_table[] = { +const unsigned short ucs_i_jis_table[] = { /* 4E00h */ 0x306C,0x437A,0xB0A1,0x3C37,0xB0A2,0xB0A3,0x0000,0x4B7C, 0x3E66,0x3B30,0x3E65,0x323C,0xB0A4,0x4954,0x4D3F,0x0000, @@ -5805,11 +5807,11 @@ static const unsigned short ucs_i_jis_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_i_jis_table_min = 0x4E00; -static const int ucs_i_jis_table_max = 0x4E00 + (sizeof (ucs_i_jis_table) / sizeof (unsigned short)); +const int ucs_i_jis_table_min = 0x4E00; +const int ucs_i_jis_table_max = 0x4E00 + (sizeof (ucs_i_jis_table) / sizeof (unsigned short)); -static const unsigned short ucs_r_jis_table[] = { +const unsigned short ucs_r_jis_table[] = { /* FF00h */ 0x0000,0x212A,0x0000,0x2174,0x2170,0x2173,0x2175,0x0000, 0x214A,0x214B,0x2176,0x215C,0x2124,0x0000,0x2125,0x213F, @@ -5818,7 +5820,7 @@ static const unsigned short ucs_r_jis_table[] = { 0x2177,0x2341,0x2342,0x2343,0x2344,0x2345,0x2346,0x2347, 0x2348,0x2349,0x234A,0x234B,0x234C,0x234D,0x234E,0x234F, 0x2350,0x2351,0x2352,0x2353,0x2354,0x2355,0x2356,0x2357, - 0x2358,0x2359,0x235A,0x214E,0x2140,0x214F,0x2130,0x2132, + 0x2358,0x2359,0x235A,0x214E,0x0000,0x214F,0x2130,0x2132, 0x212E,0x2361,0x2362,0x2363,0x2364,0x2365,0x2366,0x2367, 0x2368,0x2369,0x236A,0x236B,0x236C,0x236D,0x236E,0x236F, 0x2370,0x2371,0x2372,0x2373,0x2374,0x2375,0x2376,0x2377, @@ -5841,7 +5843,30 @@ static const unsigned short ucs_r_jis_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x2131,0x0000,0x216F }; -static const int ucs_r_jis_table_min = 0xFF00; -static const int ucs_r_jis_table_max = 0xFF00 + (sizeof (ucs_r_jis_table) / sizeof (unsigned short)); +int ucs_r_jis_table_min = 0xFF00; +int ucs_r_jis_table_max = 0xFF00 + (sizeof (ucs_r_jis_table) / sizeof (unsigned short)); + +#else + +extern const unsigned short jisx0208_ucs_table[]; +extern const unsigned short jisx0212_ucs_table[]; +extern const unsigned short ucs_a1_jis_table[]; +extern const unsigned short ucs_a2_jis_table[]; +extern const unsigned short ucs_i_jis_table[]; +extern const unsigned short ucs_r_jis_table[]; + +extern const int jisx0208_ucs_table_size; +extern const int jisx0212_ucs_table_size; +extern const int ucs_a1_jis_table_min; +extern const int ucs_a1_jis_table_max; +extern const int ucs_a2_jis_table_min; +extern const int ucs_a2_jis_table_max; +extern const int ucs_i_jis_table_min; +extern const int ucs_i_jis_table_max; +extern int ucs_r_jis_table_min; +extern int ucs_r_jis_table_max; + +#endif + #endif /* UNICODE_TABLE_JIS_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_jis2004.h b/ext/mbstring/libmbfl/filters/unicode_table_jis2004.h new file mode 100644 index 0000000000..5ae282e91b --- /dev/null +++ b/ext/mbstring/libmbfl/filters/unicode_table_jis2004.h @@ -0,0 +1,5067 @@ +/* + * "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: Rui Hirokawa <hirokawa@php.net> + */ + +#ifndef UNICODE_TABLE_JIS2004_H +#define UNICODE_TABLE_JIS2004_H + +/* + * Unicode table + */ + +static const unsigned short jisx0213_ucs_table[] = { // 0x0000 - 0x2C0F + +/* plane 1 ku 1 */ +0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, +0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, +0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD, +0x3005,0x3006,0x3007,0x30FC,0x2014,0x2010,0xFF0F,0xFF3C, +0x301C,0x2016,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C, +0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B, +0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E, +0x300F,0x3010,0x3011,0xFF0B,0x2212,0x00B1,0x00D7,0x00F7, +0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E,0x2234, +0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5,0xFF04, +0x00A2,0x00A3,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20,0x00A7, +0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7, +/* plane 1 ku 2 */ +0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B, +0x3012,0x2192,0x2190,0x2191,0x2193,0x3013,0xFF07,0xFF02, +0xFF0D,0xFF5E,0x3033,0x3034,0x3035,0x303B,0x303C,0x30FF, +0x309F,0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A, +0x2229,0x2284,0x2285,0x228A,0x228B,0x2209,0x2205,0x2305, +0x2306,0x2227,0x2228,0x00AC,0x21D2,0x21D4,0x2200,0x2203, +0x2295,0x2296,0x2297,0x2225,0x2226,0xFF5F,0xFF60,0x3018, +0x3019,0x3016,0x3017,0x2220,0x22A5,0x2312,0x2202,0x2207, +0x2261,0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x2235, +0x222B,0x222C,0x2262,0x2243,0x2245,0x2248,0x2276,0x2277, +0x2194,0x212B,0x2030,0x266F,0x266D,0x266A,0x2020,0x2021, +0x00B6,0x266E,0x266B,0x266C,0x2669,0x25EF, +/* plane 1 ku 3 */ +0x25B7,0x25B6,0x25C1,0x25C0,0x2197,0x2198,0x2196,0x2199, +0x21C4,0x21E8,0x21E6,0x21E7,0x21E9,0x2934,0x2935,0xFF10, +0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,0xFF18, +0xFF19,0x29BF,0x25C9,0x303D,0xFE46,0xFE45,0x25E6,0x2022, +0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,0xFF28, +0xFF29,0xFF2A,0xFF2B,0xFF2C,0xFF2D,0xFF2E,0xFF2F,0xFF30, +0xFF31,0xFF32,0xFF33,0xFF34,0xFF35,0xFF36,0xFF37,0xFF38, +0xFF39,0xFF3A,0x2213,0x2135,0x210F,0x33CB,0x2113,0x2127, +0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47,0xFF48, +0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F,0xFF50, +0xFF51,0xFF52,0xFF53,0xFF54,0xFF55,0xFF56,0xFF57,0xFF58, +0xFF59,0xFF5A,0x30A0,0x2013,0x29FA,0x29FB, +/* plane 1 ku 4 */ +0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048, +0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050, +0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058, +0x3059,0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060, +0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068, +0x3069,0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070, +0x3071,0x3072,0x3073,0x3074,0x3075,0x3076,0x3077,0x3078, +0x3079,0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080, +0x3081,0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088, +0x3089,0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090, +0x3091,0x3092,0x3093,0x3094,0x3095,0x3096,0x0000,0x304D, +0x304F,0x3051,0x3053,0x0000,0x0000,0x0000, +/* plane 1 ku 5 */ +0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, +0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, +0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, +0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, +0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, +0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, +0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, +0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF,0x30E0, +0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7,0x30E8, +0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF,0x30F0, +0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6,0x30AB,0x30AD, +0x30AF,0x30B1,0x30B3,0x30BB,0x30C4,0x30C8, +/* plane 1 ku 6 */ +0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398, +0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0, +0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, +0x2664,0x2660,0x2662,0x2666,0x2661,0x2665,0x2667,0x2663, +0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8, +0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, +0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9, +0x03C2,0x24F5,0x24F6,0x24F7,0x24F8,0x24F9,0x24FA,0x24FB, +0x24FC,0x24FD,0x24FE,0x2616,0x2617,0x3020,0x260E,0x2600, +0x2601,0x2602,0x2603,0x2668,0x25B1,0x31F0,0x31F1,0x31F2, +0x31F3,0x31F4,0x31F5,0x31F6,0x31F7,0x31F8,0x31F9,0x31F7, +0x31FA,0x31FB,0x31FC,0x31FD,0x31FE,0x31FF, +/* plane 1 ku 7 */ +0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, +0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, +0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, +0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, +0x042F,0x23BE,0x23BF,0x23C0,0x23C1,0x23C2,0x23C3,0x23C4, +0x23C5,0x23C6,0x23C7,0x23C8,0x23C9,0x23CA,0x23CB,0x23CC, +0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, +0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, +0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446, +0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, +0x044F,0x30F7,0x30F8,0x30F9,0x30FA,0x22DA,0x22DB,0x2153, +0x2154,0x2155,0x2713,0x2318,0x2423,0x23CE, +/* plane 1 ku 8 */ +0x2500,0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C, +0x2524,0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B, +0x2517,0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F, +0x2528,0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542, +0x3251,0x3252,0x3253,0x3254,0x3255,0x3256,0x3257,0x3258, +0x3259,0x325A,0x325B,0x325C,0x325D,0x325E,0x325F,0x32B1, +0x32B2,0x32B3,0x32B4,0x32B5,0x32B6,0x32B7,0x32B8,0x32B9, +0x32BA,0x32BB,0x32BC,0x32BD,0x32BE,0x32BF,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x25D0,0x25D1, +0x25D2,0x25D3,0x203C,0x2047,0x2048,0x2049,0x01CD,0x01CE, +0x01D0,0x1E3E,0x1E3F,0x01F8,0x01F9,0x01D1,0x01D2,0x01D4, +0x01D6,0x01D8,0x01DA,0x01DC,0x0000,0x0000, +/* plane 1 ku 9 */ +0x20AC,0x00A0,0x00A1,0x00A4,0x00A6,0x00A9,0x00AA,0x00AB, +0x00AD,0x00AE,0x00AF,0x00B2,0x00B3,0x00B7,0x00B8,0x00B9, +0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1, +0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9, +0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1, +0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D8,0x00D9,0x00DA, +0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2, +0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA, +0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2, +0x00F3,0x00F4,0x00F5,0x00F6,0x00F8,0x00F9,0x00FA,0x00FB, +0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x012A,0x016A,0x0112, +0x014C,0x0101,0x012B,0x016B,0x0113,0x014D, +/* plane 1 ku 10 */ +0x0104,0x02D8,0x0141,0x013D,0x015A,0x0160,0x015E,0x0164, +0x0179,0x017D,0x017B,0x0105,0x02DB,0x0142,0x013E,0x015B, +0x02C7,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C, +0x0154,0x0102,0x0139,0x0106,0x010C,0x0118,0x011A,0x010E, +0x0143,0x0147,0x0150,0x0158,0x016E,0x0170,0x0162,0x0155, +0x0103,0x013A,0x0107,0x010D,0x0119,0x011B,0x010F,0x0111, +0x0144,0x0148,0x0151,0x0159,0x016F,0x0171,0x0163,0x02D9, +0x0108,0x011C,0x0124,0x0134,0x015C,0x016C,0x0109,0x011D, +0x0125,0x0135,0x015D,0x016D,0x0271,0x028B,0x027E,0x0283, +0x0292,0x026C,0x026E,0x0279,0x0288,0x0256,0x0273,0x027D, +0x0282,0x0290,0x027B,0x026D,0x025F,0x0272,0x029D,0x028E, +0x0261,0x014B,0x0270,0x0281,0x0127,0x0295, +/* plane 1 ku 11 */ +0x0294,0x0266,0x0298,0x01C2,0x0253,0x0257,0x0284,0x0260, +0x0193,0x0153,0x0152,0x0268,0x0289,0x0258,0x0275,0x0259, +0x025C,0x025E,0x0250,0x026F,0x028A,0x0264,0x028C,0x0254, +0x0251,0x0252,0x028D,0x0265,0x02A2,0x02A1,0x0255,0x0291, +0x027A,0x0267,0x025A,0x00E6,0x01FD,0x1F70,0x1F71,0x0254, +0x0254,0x028C,0x028C,0x0259,0x0259,0x025A,0x025A,0x1F72, +0x1F73,0x0361,0x02C8,0x02CC,0x02D0,0x02D1,0x0306,0x203F, +0x030B,0x0301,0x0304,0x0300,0x030F,0x030C,0x0302,0x02E5, +0x02E6,0x02E7,0x02E8,0x02E9,0x02E9,0x02E5,0x0325,0x032C, +0x0339,0x031C,0x031F,0x0320,0x0308,0x033D,0x0329,0x032F, +0x02DE,0x0324,0x0330,0x033C,0x0334,0x031D,0x031E,0x0318, +0x0319,0x032A,0x033A,0x033B,0x0303,0x031A, +/* plane 1 ku 12 */ +0x2776,0x2777,0x2778,0x2779,0x277A,0x277B,0x277C,0x277D, +0x277E,0x277F,0x24EB,0x24EC,0x24ED,0x24EE,0x24EF,0x24F0, +0x24F1,0x24F2,0x24F3,0x24F4,0x2170,0x2171,0x2172,0x2173, +0x2174,0x2175,0x2176,0x2177,0x2178,0x2179,0x217A,0x217B, +0x24D0,0x24D1,0x24D2,0x24D3,0x24D4,0x24D5,0x24D6,0x24D7, +0x24D8,0x24D9,0x24DA,0x24DB,0x24DC,0x24DD,0x24DE,0x24DF, +0x24E0,0x24E1,0x24E2,0x24E3,0x24E4,0x24E5,0x24E6,0x24E7, +0x24E8,0x24E9,0x32D0,0x32D1,0x32D2,0x32D3,0x32D4,0x32D5, +0x32D6,0x32D7,0x32D8,0x32D9,0x32DA,0x32DB,0x32DC,0x32DD, +0x32DE,0x32DF,0x32E0,0x32E1,0x32E2,0x32E3,0x32FA,0x32E9, +0x32E5,0x32ED,0x32EC,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x2051,0x2042, +/* plane 1 ku 13 */ +0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, +0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, +0x2470,0x2471,0x2472,0x2473,0x2160,0x2161,0x2162,0x2163, +0x2164,0x2165,0x2166,0x2167,0x2168,0x2169,0x216A,0x3349, +0x3314,0x3322,0x334D,0x3318,0x3327,0x3303,0x3336,0x3351, +0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,0x333B,0x339C, +0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x216B,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x337B,0x301D, +0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7, +0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x0000, +0x0000,0x0000,0x222E,0x0000,0x0000,0x0000,0x0000,0x221F, +0x22BF,0x0000,0x0000,0x0000,0x2756,0x261E, +/* plane 1 ku 14 */ +0x4FF1,0x0000,0x3402,0x4E28,0x4E2F,0x4E30,0x4E8D,0x4EE1, +0x4EFD,0x4EFF,0x4F03,0x4F0B,0x4F60,0x4F48,0x4F49,0x4F56, +0x4F5F,0x4F6A,0x4F6C,0x4F7E,0x4F8A,0x4F94,0x4F97,0xFA30, +0x4FC9,0x4FE0,0x5001,0x5002,0x500E,0x5018,0x5027,0x502E, +0x5040,0x503B,0x5041,0x5094,0x50CC,0x50F2,0x50D0,0x50E6, +0xFA31,0x5106,0x5103,0x510B,0x511E,0x5135,0x514A,0xFA32, +0x5155,0x5157,0x34B5,0x519D,0x51C3,0x51CA,0x51DE,0x51E2, +0x51EE,0x5201,0x34DB,0x5213,0x5215,0x5249,0x5257,0x5261, +0x5293,0x52C8,0xFA33,0x52CC,0x52D0,0x52D6,0x52DB,0xFA34, +0x52F0,0x52FB,0x5300,0x5307,0x531C,0xFA35,0x5361,0x5363, +0x537D,0x5393,0x539D,0x53B2,0x5412,0x5427,0x544D,0x549C, +0x546B,0x5474,0x547F,0x5488,0x5496,0x54A1, +/* plane 1 ku 15 */ +0x54A9,0x54C6,0x54FF,0x550E,0x552B,0x5535,0x5550,0x555E, +0x5581,0x5586,0x558E,0xFA36,0x55AD,0x55CE,0xFA37,0x5608, +0x560E,0x563B,0x5649,0x5676,0x5666,0xFA38,0x566F,0x5671, +0x5672,0x5699,0x569E,0x56A9,0x56AC,0x56B3,0x56C9,0x56CA, +0x570A,0x0000,0x5721,0x572F,0x5733,0x5734,0x5770,0x5777, +0x577C,0x579C,0xFA0F,0x0000,0x57B8,0x57C7,0x57C8,0x57CF, +0x57E4,0x57ED,0x57F5,0x57F6,0x57FF,0x5809,0xFA10,0x5861, +0x5864,0xFA39,0x587C,0x5889,0x589E,0xFA3A,0x58A9,0x0000, +0x58D2,0x58CE,0x58D4,0x58DA,0x58E0,0x58E9,0x590C,0x8641, +0x595D,0x596D,0x598B,0x5992,0x59A4,0x59C3,0x59D2,0x59DD, +0x5A13,0x5A23,0x5A67,0x5A6D,0x5A77,0x5A7E,0x5A84,0x5A9E, +0x5AA7,0x5AC4,0x0000,0x5B19,0x5B25,0x525D, +/* plane 1 ku 16 */ +0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6, +0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED, +0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B, +0x59D0,0x867B,0x98F4,0x7D62,0x7DBE,0x9B8E,0x6216,0x7C9F, +0x88B7,0x5B89,0x5EB5,0x6309,0x6697,0x6848,0x95C7,0x978D, +0x674F,0x4EE5,0x4F0A,0x4F4D,0x4F9D,0x5049,0x56F2,0x5937, +0x59D4,0x5A01,0x5C09,0x60DF,0x610F,0x6170,0x6613,0x6905, +0x70BA,0x754F,0x7570,0x79FB,0x7DAD,0x7DEF,0x80C3,0x840E, +0x8863,0x8B02,0x9055,0x907A,0x533B,0x4E95,0x4EA5,0x57DF, +0x80B2,0x90C1,0x78EF,0x4E00,0x58F1,0x6EA2,0x9038,0x7A32, +0x8328,0x828B,0x9C2F,0x5141,0x5370,0x54BD,0x54E1,0x56E0, +0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D, +/* plane 1 ku 17 */ +0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87,0x70CF, +0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11,0x7893, +0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B,0x59E5, +0x53A9,0x6D66,0x74DC,0x958F,0x5642,0x4E91,0x904B,0x96F2, +0x834F,0x990C,0x53E1,0x55B6,0x5B30,0x5F71,0x6620,0x66F3, +0x6804,0x6C38,0x6CF3,0x6D29,0x745B,0x76C8,0x7A4E,0x9834, +0x82F1,0x885B,0x8A60,0x92ED,0x6DB2,0x75AB,0x76CA,0x99C5, +0x60A6,0x8B01,0x8D8A,0x95B2,0x698E,0x53AD,0x5186,0x5712, +0x5830,0x5944,0x5BB4,0x5EF6,0x6028,0x63A9,0x63F4,0x6CBF, +0x6F14,0x708E,0x7114,0x7159,0x71D5,0x733F,0x7E01,0x8276, +0x82D1,0x8597,0x9060,0x925B,0x9D1B,0x5869,0x65BC,0x6C5A, +0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC, +/* plane 1 ku 18 */ +0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956, +0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B, +0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069, +0x6E29,0x7A4F,0x97F3,0x4E0B,0x5316,0x4EEE,0x4F55,0x4F3D, +0x4FA1,0x4F73,0x52A0,0x53EF,0x5609,0x590F,0x5AC1,0x5BB6, +0x5BE1,0x79D1,0x6687,0x679C,0x67B6,0x6B4C,0x6CB3,0x706B, +0x73C2,0x798D,0x79BE,0x7A3C,0x7B87,0x82B1,0x82DB,0x8304, +0x8377,0x83EF,0x83D3,0x8766,0x8AB2,0x5629,0x8CA8,0x8FE6, +0x904E,0x971E,0x868A,0x4FC4,0x5CE8,0x6211,0x7259,0x753B, +0x81E5,0x82BD,0x86FE,0x8CC0,0x96C5,0x9913,0x99D5,0x4ECB, +0x4F1A,0x89E3,0x56DE,0x584A,0x58CA,0x5EFB,0x5FEB,0x602A, +0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539, +/* plane 1 ku 19 */ +0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686,0x7D75, +0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE,0x5916, +0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D,0x84CB, +0x8857,0x8A72,0x93A7,0x9AB8,0x6D6C,0x99A8,0x86D9,0x57A3, +0x67FF,0x86CE,0x920E,0x5283,0x5687,0x5404,0x5ED3,0x62E1, +0x64B9,0x683C,0x6838,0x6BBB,0x7372,0x78BA,0x7A6B,0x899A, +0x89D2,0x8D6B,0x8F03,0x90ED,0x95A3,0x9694,0x9769,0x5B66, +0x5CB3,0x697D,0x984D,0x984E,0x639B,0x7B20,0x6A2B,0x6A7F, +0x68B6,0x9C0D,0x6F5F,0x5272,0x559D,0x6070,0x62EC,0x6D3B, +0x6E07,0x6ED1,0x845B,0x8910,0x8F44,0x4E14,0x9C39,0x53F6, +0x691B,0x6A3A,0x9784,0x682A,0x515C,0x7AC3,0x84B2,0x91DC, +0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431, +/* plane 1 ku 20 */ +0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2, +0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C, +0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE, +0x63DB,0x6562,0x67D1,0x6853,0x68FA,0x6B3E,0x6B53,0x6C57, +0x6F22,0x6F97,0x6F45,0x74B0,0x7518,0x76E3,0x770B,0x7AFF, +0x7BA1,0x7C21,0x7DE9,0x7F36,0x7FF0,0x809D,0x8266,0x839E, +0x89B3,0x8ACC,0x8CAB,0x9084,0x9451,0x9593,0x9591,0x95A2, +0x9665,0x97D3,0x9928,0x8218,0x4E38,0x542B,0x5CB8,0x5DCC, +0x73A9,0x764C,0x773C,0x5CA9,0x7FEB,0x8D0B,0x96C1,0x9811, +0x9854,0x9858,0x4F01,0x4F0E,0x5371,0x559C,0x5668,0x57FA, +0x5947,0x5B09,0x5BC4,0x5C90,0x5E0C,0x5E7E,0x5FCC,0x63EE, +0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4, +/* plane 1 ku 21 */ +0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948,0x5B63, +0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77,0x8ECC, +0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100,0x5993, +0x5B9C,0x622F,0x6280,0x64EC,0x6B3A,0x72A0,0x7591,0x7947, +0x7FA9,0x87FB,0x8ABC,0x8B70,0x63AC,0x83CA,0x97A0,0x5409, +0x5403,0x55AB,0x6854,0x6A58,0x8A70,0x7827,0x6775,0x9ECD, +0x5374,0x5BA2,0x811A,0x8650,0x9006,0x4E18,0x4E45,0x4EC7, +0x4F11,0x53CA,0x5438,0x5BAE,0x5F13,0x6025,0x6551,0x673D, +0x6C42,0x6C72,0x6CE3,0x7078,0x7403,0x7A76,0x7AAE,0x7B08, +0x7D1A,0x7CFE,0x7D66,0x65E7,0x725B,0x53BB,0x5C45,0x5DE8, +0x62D2,0x62E0,0x6319,0x6E20,0x865A,0x8A31,0x8DDD,0x92F8, +0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC, +/* plane 1 ku 22 */ +0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354, +0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A, +0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2, +0x72ED,0x77EF,0x80F8,0x8105,0x8208,0x854E,0x90F7,0x93E1, +0x97FF,0x9957,0x9A5A,0x4EF0,0x51DD,0x5C2D,0x6681,0x696D, +0x5C40,0x66F2,0x6975,0x7389,0x6850,0x7C81,0x50C5,0x52E4, +0x5747,0x5DFE,0x9326,0x65A4,0x6B23,0x6B3D,0x7434,0x7981, +0x79BD,0x7B4B,0x7DCA,0x82B9,0x83CC,0x887F,0x895F,0x8B39, +0x8FD1,0x91D1,0x541F,0x9280,0x4E5D,0x5036,0x53E5,0x533A, +0x72D7,0x7396,0x77E9,0x82E6,0x8EAF,0x99C6,0x99C8,0x99D2, +0x5177,0x611A,0x865E,0x55B0,0x7A7A,0x5076,0x5BD3,0x9047, +0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48, +/* plane 1 ku 23 */ +0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A,0x9688, +0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B,0x85AB, +0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941,0x4FC2, +0x50BE,0x5211,0x5144,0x5553,0x572D,0x73EA,0x578B,0x5951, +0x5F62,0x5F84,0x6075,0x6176,0x6167,0x61A9,0x63B2,0x643A, +0x656C,0x666F,0x6842,0x6E13,0x7566,0x7A3D,0x7CFB,0x7D4C, +0x7D99,0x7E4B,0x7F6B,0x830E,0x834A,0x86CD,0x8A08,0x8A63, +0x8B66,0x8EFD,0x981A,0x9D8F,0x82B8,0x8FCE,0x9BE8,0x5287, +0x621F,0x6483,0x6FC0,0x9699,0x6841,0x5091,0x6B20,0x6C7A, +0x6F54,0x7A74,0x7D50,0x8840,0x8A23,0x6708,0x4EF6,0x5039, +0x5026,0x5065,0x517C,0x5238,0x5263,0x55A7,0x570F,0x5805, +0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372, +/* plane 1 ku 24 */ +0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79, +0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375, +0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B, +0x5F26,0x6E1B,0x6E90,0x7384,0x73FE,0x7D43,0x8237,0x8A00, +0x8AFA,0x9650,0x4E4E,0x500B,0x53E4,0x547C,0x56FA,0x59D1, +0x5B64,0x5DF1,0x5EAB,0x5F27,0x6238,0x6545,0x67AF,0x6E56, +0x72D0,0x7CCA,0x88B4,0x80A1,0x80E1,0x83F0,0x864E,0x8A87, +0x8DE8,0x9237,0x96C7,0x9867,0x9F13,0x4E94,0x4E92,0x4F0D, +0x5348,0x5449,0x543E,0x5A2F,0x5F8C,0x5FA1,0x609F,0x68A7, +0x6A8E,0x745A,0x7881,0x8A9E,0x8AA4,0x8B77,0x9190,0x4E5E, +0x9BC9,0x4EA4,0x4F7C,0x4FAF,0x5019,0x5016,0x5149,0x516C, +0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411, +/* plane 1 ku 25 */ +0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D,0x5B8F, +0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7,0x5F18, +0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602,0x6643, +0x66F4,0x676D,0x6821,0x6897,0x69CB,0x6C5F,0x6D2A,0x6D69, +0x6E2F,0x6E9D,0x7532,0x7687,0x786C,0x7A3F,0x7CE0,0x7D05, +0x7D18,0x7D5E,0x7DB1,0x8015,0x8003,0x80AF,0x80B1,0x8154, +0x818F,0x822A,0x8352,0x884C,0x8861,0x8B1B,0x8CA2,0x8CFC, +0x90CA,0x9175,0x9271,0x783F,0x92FC,0x95A4,0x964D,0x9805, +0x9999,0x9AD8,0x9D3B,0x525B,0x52AB,0x53F7,0x5408,0x58D5, +0x62F7,0x6FE0,0x8C6A,0x8F5F,0x9EB9,0x514B,0x523B,0x544A, +0x56FD,0x7A40,0x9177,0x9D60,0x9ED2,0x7344,0x6F09,0x8170, +0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC, +/* plane 1 ku 26 */ +0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068, +0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A, +0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6, +0x5DEE,0x67FB,0x6C99,0x7473,0x7802,0x8A50,0x9396,0x88DF, +0x5750,0x5EA7,0x632B,0x50B5,0x50AC,0x518D,0x6700,0x54C9, +0x585E,0x59BB,0x5BB0,0x5F69,0x624D,0x63A1,0x683D,0x6B73, +0x6E08,0x707D,0x91C7,0x7280,0x7815,0x7826,0x796D,0x658E, +0x7D30,0x83DC,0x88C1,0x8F09,0x969B,0x5264,0x5728,0x6750, +0x7F6A,0x8CA1,0x51B4,0x5742,0x962A,0x583A,0x698A,0x80B4, +0x54B2,0x5D0E,0x57FC,0x7895,0x9DFA,0x4F5C,0x524A,0x548B, +0x643E,0x6628,0x6714,0x67F5,0x7A84,0x7B56,0x7D22,0x932F, +0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237, +/* plane 1 ku 27 */ +0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9,0x96D1, +0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652,0x4E09, +0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F,0x71E6, +0x73CA,0x7523,0x7B97,0x7E82,0x8695,0x8B83,0x8CDB,0x9178, +0x9910,0x65AC,0x66AB,0x6B8B,0x4ED5,0x4ED4,0x4F3A,0x4F7F, +0x523A,0x53F8,0x53F2,0x55E3,0x56DB,0x58EB,0x59CB,0x59C9, +0x59FF,0x5B50,0x5C4D,0x5E02,0x5E2B,0x5FD7,0x601D,0x6307, +0x652F,0x5B5C,0x65AF,0x65BD,0x65E8,0x679D,0x6B62,0x6B7B, +0x6C0F,0x7345,0x7949,0x79C1,0x7CF8,0x7D19,0x7D2B,0x80A2, +0x8102,0x81F3,0x8996,0x8A5E,0x8A69,0x8A66,0x8A8C,0x8AEE, +0x8CC7,0x8CDC,0x96CC,0x98FC,0x6B6F,0x4E8B,0x4F3C,0x4F8D, +0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642, +/* plane 1 ku 28 */ +0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A, +0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F, +0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1, +0x57F7,0x5931,0x5AC9,0x5BA4,0x6089,0x6E7F,0x6F06,0x75BE, +0x8CEA,0x5B9F,0x8500,0x7BE0,0x5072,0x67F4,0x829D,0x5C61, +0x854A,0x7E1E,0x820E,0x5199,0x5C04,0x6368,0x8D66,0x659C, +0x716E,0x793E,0x7D17,0x8005,0x8B1D,0x8ECA,0x906E,0x86C7, +0x90AA,0x501F,0x52FA,0x5C3A,0x6753,0x707C,0x7235,0x914C, +0x91C8,0x932B,0x82E5,0x5BC2,0x5F31,0x60F9,0x4E3B,0x53D6, +0x5B88,0x624B,0x6731,0x6B8A,0x72E9,0x73E0,0x7A2E,0x816B, +0x8DA3,0x9152,0x9996,0x5112,0x53D7,0x546A,0x5BFF,0x6388, +0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468, +/* plane 1 ku 29 */ +0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32,0x79C0, +0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490,0x8846, +0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C,0x96C6, +0x919C,0x4EC0,0x4F4F,0x5145,0x5341,0x5F93,0x620E,0x67D4, +0x6C41,0x6E0B,0x7363,0x7E26,0x91CD,0x9283,0x53D4,0x5919, +0x5BBF,0x6DD1,0x795D,0x7E2E,0x7C9B,0x587E,0x719F,0x51FA, +0x8853,0x8FF0,0x4FCA,0x5CFB,0x6625,0x77AC,0x7AE3,0x821C, +0x99FF,0x51C6,0x5FAA,0x65EC,0x696F,0x6B89,0x6DF3,0x6E96, +0x6F64,0x76FE,0x7D14,0x5DE1,0x9075,0x9187,0x9806,0x51E6, +0x521D,0x6240,0x6691,0x66D9,0x6E1A,0x5EB6,0x7DD2,0x7F72, +0x66F8,0x85AF,0x85F7,0x8AF8,0x52A9,0x53D9,0x5973,0x5E8F, +0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F, +/* ku 30 */ +0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617, +0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A, +0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C, +0x6377,0x6607,0x660C,0x662D,0x6676,0x677E,0x68A2,0x6A1F, +0x6A35,0x6CBC,0x6D88,0x6E09,0x6E58,0x713C,0x7126,0x7167, +0x75C7,0x7701,0x785D,0x7901,0x7965,0x79F0,0x7AE0,0x7B11, +0x7CA7,0x7D39,0x8096,0x83D6,0x848B,0x8549,0x885D,0x88F3, +0x8A1F,0x8A3C,0x8A54,0x8A73,0x8C61,0x8CDE,0x91A4,0x9266, +0x937E,0x9418,0x969C,0x9798,0x4E0A,0x4E08,0x4E1E,0x4E57, +0x5197,0x5270,0x57CE,0x5834,0x58CC,0x5B22,0x5E38,0x60C5, +0x64FE,0x6761,0x6756,0x6D44,0x72B6,0x7573,0x7A63,0x84B8, +0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE, +/* ku 31 */ +0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272,0x89E6, +0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5,0x5507, +0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0,0x664B, +0x68EE,0x699B,0x6D78,0x6DF1,0x7533,0x75B9,0x771F,0x795E, +0x79E6,0x7D33,0x81E3,0x82AF,0x85AA,0x89AA,0x8A3A,0x8EAB, +0x8F9B,0x9032,0x91DD,0x9707,0x4EBA,0x4EC1,0x5203,0x5875, +0x58EC,0x5C0B,0x751A,0x5C3D,0x814E,0x8A0A,0x8FC5,0x9663, +0x976D,0x7B25,0x8ACF,0x9808,0x9162,0x56F3,0x53A8,0x9017, +0x5439,0x5782,0x5E25,0x63A8,0x6C34,0x708A,0x7761,0x7C8B, +0x7FE0,0x8870,0x9042,0x9154,0x9310,0x9318,0x968F,0x745E, +0x9AC4,0x5D07,0x5D69,0x6570,0x67A2,0x8DA8,0x96DB,0x636E, +0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE, +/* plane 1 ku 32 */ +0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4, +0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574, +0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F, +0x76DB,0x7CBE,0x8056,0x58F0,0x88FD,0x897F,0x8AA0,0x8A93, +0x8ACB,0x901D,0x9192,0x9752,0x9759,0x6589,0x7A0E,0x8106, +0x96BB,0x5E2D,0x60DC,0x621A,0x65A5,0x6614,0x6790,0x77F3, +0x7A4D,0x7C4D,0x7E3E,0x810A,0x8CAC,0x8D64,0x8DE1,0x8E5F, +0x78A9,0x5207,0x62D9,0x63A5,0x6442,0x6298,0x8A2D,0x7A83, +0x7BC0,0x8AAC,0x96EA,0x7D76,0x820C,0x8749,0x4ED9,0x5148, +0x5343,0x5360,0x5BA3,0x5C02,0x5C16,0x5DDD,0x6226,0x6247, +0x64B0,0x6813,0x6834,0x6CC9,0x6D45,0x6D17,0x67D3,0x6F5C, +0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA, +/* plane 1 ku 33 */ +0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E,0x8CCE, +0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE,0x524D, +0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3,0x7CCE, +0x564C,0x5851,0x5CA8,0x63AA,0x66FE,0x66FD,0x695A,0x72D9, +0x758F,0x758E,0x790E,0x7956,0x79DF,0x7C97,0x7D20,0x7D44, +0x8607,0x8A34,0x963B,0x9061,0x9F20,0x50E7,0x5275,0x53CC, +0x53E2,0x5009,0x55AA,0x58EE,0x594F,0x723D,0x5B8B,0x5C64, +0x531D,0x60E3,0x60F3,0x635C,0x6383,0x633F,0x63BB,0x64CD, +0x65E9,0x66F9,0x5DE3,0x69CD,0x69FD,0x6F15,0x71E5,0x4E89, +0x75E9,0x76F8,0x7A93,0x7CDF,0x7DCF,0x7D9C,0x8061,0x8349, +0x8358,0x846C,0x84BC,0x85FB,0x88C5,0x8D70,0x9001,0x906D, +0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E, +/* plane 1 ku 34 */ +0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373, +0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E, +0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58, +0x5B6B,0x5C0A,0x640D,0x6751,0x905C,0x4ED6,0x591A,0x592A, +0x6C70,0x8A51,0x553E,0x5815,0x59A5,0x60F0,0x6253,0x67C1, +0x8235,0x6955,0x9640,0x99C4,0x9A28,0x4F53,0x5806,0x5BFE, +0x8010,0x5CB1,0x5E2F,0x5F85,0x6020,0x614B,0x6234,0x66FF, +0x6CF0,0x6EDE,0x80CE,0x817F,0x82D4,0x888B,0x8CB8,0x9000, +0x902E,0x968A,0x9EDB,0x9BDB,0x4EE3,0x53F0,0x5927,0x7B2C, +0x918D,0x984C,0x9DF9,0x6EDD,0x7027,0x5353,0x5544,0x5B85, +0x6258,0x629E,0x62D3,0x6CA2,0x6FEF,0x7422,0x8A17,0x9438, +0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA, +/* plane 1 ku 35 */ +0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD,0x7AEA, +0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0,0x4E39, +0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E,0x6DE1, +0x6E5B,0x70AD,0x77ED,0x7AEF,0x7BAA,0x7DBB,0x803D,0x80C6, +0x86CB,0x8A95,0x935B,0x56E3,0x58C7,0x5F3E,0x65AD,0x6696, +0x6A80,0x6BB5,0x7537,0x8AC7,0x5024,0x77E5,0x5730,0x5F1B, +0x6065,0x667A,0x6C60,0x75F4,0x7A1A,0x7F6E,0x81F4,0x8718, +0x9045,0x99B3,0x7BC9,0x755C,0x7AF9,0x7B51,0x84C4,0x9010, +0x79E9,0x7A92,0x8336,0x5AE1,0x7740,0x4E2D,0x4EF2,0x5B99, +0x5FE0,0x62BD,0x663C,0x67F1,0x6CE8,0x866B,0x8877,0x8A3B, +0x914E,0x92F3,0x99D0,0x6A17,0x7026,0x732A,0x82E7,0x8457, +0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5, +/* plane 1 ku 36 */ +0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2, +0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074, +0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A, +0x9577,0x9802,0x9CE5,0x52C5,0x6357,0x76F4,0x6715,0x6C88, +0x73CD,0x8CC3,0x93AE,0x9673,0x6D25,0x589C,0x690E,0x69CC, +0x8FFD,0x939A,0x75DB,0x901A,0x585A,0x6802,0x63B4,0x69FB, +0x4F43,0x6F2C,0x67D8,0x8FBB,0x8526,0x7DB4,0x9354,0x693F, +0x6F70,0x576A,0x58F7,0x5B2C,0x7D2C,0x722A,0x540A,0x91E3, +0x9DB4,0x4EAD,0x4F4E,0x505C,0x5075,0x5243,0x8C9E,0x5448, +0x5824,0x5B9A,0x5E1D,0x5E95,0x5EAD,0x5EF7,0x5F1F,0x608C, +0x62B5,0x633A,0x63D0,0x68AF,0x6C40,0x7887,0x798E,0x7A0B, +0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013, +/* plane 1 ku 37 */ +0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2,0x6575, +0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2,0x5FB9, +0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929,0x5C55, +0x5E97,0x6DFB,0x7E8F,0x751C,0x8CBC,0x8EE2,0x985B,0x70B9, +0x4F1D,0x6BBF,0x6FB1,0x7530,0x96FB,0x514E,0x5410,0x5835, +0x5857,0x59AC,0x5C60,0x5F92,0x6597,0x675C,0x6E21,0x767B, +0x83DF,0x8CED,0x9014,0x90FD,0x934D,0x7825,0x783A,0x52AA, +0x5EA6,0x571F,0x5974,0x6012,0x5012,0x515A,0x51AC,0x51CD, +0x5200,0x5510,0x5854,0x5858,0x5957,0x5B95,0x5CF6,0x5D8B, +0x60BC,0x6295,0x642D,0x6771,0x6843,0x68BC,0x68DF,0x76D7, +0x6DD8,0x6E6F,0x6D9B,0x706F,0x71C8,0x5F53,0x75D8,0x7977, +0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230, +/* plane 1 ku 38 */ +0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003, +0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5, +0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5, +0x80F4,0x8404,0x9053,0x9285,0x5CE0,0x9D07,0x533F,0x5F97, +0x5FB3,0x6D9C,0x7279,0x7763,0x79BF,0x7BE4,0x6BD2,0x72EC, +0x8AAD,0x6803,0x6A61,0x51F8,0x7A81,0x6934,0x5C4A,0x9CF6, +0x82EB,0x5BC5,0x9149,0x701E,0x5678,0x5C6F,0x60C7,0x6566, +0x6C8C,0x8C5A,0x9041,0x9813,0x5451,0x66C7,0x920D,0x5948, +0x90A3,0x5185,0x4E4D,0x51EA,0x8599,0x8B0E,0x7058,0x637A, +0x934B,0x6962,0x99B4,0x7E04,0x7577,0x5357,0x6960,0x8EDF, +0x96E3,0x6C5D,0x4E8C,0x5C3C,0x5F10,0x8FE9,0x5302,0x8CD1, +0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165, +/* plane 1 ku 39 */ +0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D,0x6FE1, +0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74,0x5FF5, +0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B,0x57DC, +0x56A2,0x60A9,0x6FC3,0x7D0D,0x80FD,0x8133,0x81BF,0x8FB2, +0x8997,0x86A4,0x5DF4,0x628A,0x64AD,0x8987,0x6777,0x6CE2, +0x6D3E,0x7436,0x7834,0x5A46,0x7F75,0x82AD,0x99AC,0x4FF3, +0x5EC3,0x62DD,0x6392,0x6557,0x676F,0x76C3,0x724C,0x80CC, +0x80BA,0x8F29,0x914D,0x500D,0x57F9,0x5A92,0x6885,0x6973, +0x7164,0x72FD,0x8CB7,0x58F2,0x8CE0,0x966A,0x9019,0x877F, +0x79E4,0x77E7,0x8429,0x4F2F,0x5265,0x535A,0x62CD,0x67CF, +0x6CCA,0x767D,0x7B94,0x7C95,0x8236,0x8584,0x8FEB,0x66DD, +0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6, +/* plane 1 ku 40 */ +0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61, +0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197, +0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A, +0x5859,0x86E4,0x96BC,0x4F34,0x5224,0x534A,0x53CD,0x53DB, +0x5E06,0x642C,0x6591,0x677F,0x6C3E,0x6C4E,0x7248,0x72AF, +0x73ED,0x7554,0x7E41,0x822C,0x85E9,0x8CA9,0x7BC4,0x91C6, +0x7169,0x9812,0x98EF,0x633D,0x6669,0x756A,0x76E4,0x78D0, +0x8543,0x86EE,0x532A,0x5351,0x5426,0x5983,0x5E87,0x5F7C, +0x60B2,0x6249,0x6279,0x62AB,0x6590,0x6BD4,0x6CCC,0x75B2, +0x76AE,0x7891,0x79D8,0x7DCB,0x7F77,0x80A5,0x88AB,0x8AB9, +0x8CBB,0x907F,0x975E,0x98DB,0x6A0B,0x7C38,0x5099,0x5C3E, +0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E, +/* plane 1 ku 41 */ +0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66,0x819D, +0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C,0x6867, +0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A,0x6A19, +0x6C37,0x6F02,0x74E2,0x7968,0x8868,0x8A55,0x8C79,0x5EDF, +0x63CF,0x75C5,0x79D2,0x82D7,0x9328,0x92F2,0x849C,0x86ED, +0x9C2D,0x54C1,0x5F6C,0x658C,0x6D5C,0x7015,0x8CA7,0x8CD3, +0x983B,0x654F,0x74F6,0x4E0D,0x4ED8,0x57E0,0x592B,0x5A66, +0x5BCC,0x51A8,0x5E03,0x5E9C,0x6016,0x6276,0x6577,0x65A7, +0x666E,0x6D6E,0x7236,0x7B26,0x8150,0x819A,0x8299,0x8B5C, +0x8CA0,0x8CE6,0x8D74,0x961C,0x9644,0x4FAE,0x64AB,0x6B66, +0x821E,0x8461,0x856A,0x90E8,0x5C01,0x6953,0x98A8,0x847A, +0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D, +/* plane 1 ku 42 */ +0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8, +0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4, +0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587, +0x805E,0x4E19,0x4F75,0x5175,0x5840,0x5E63,0x5E73,0x5F0A, +0x67C4,0x4E26,0x853D,0x9589,0x965B,0x7C73,0x9801,0x50FB, +0x58C1,0x7656,0x78A7,0x5225,0x77A5,0x8511,0x7B86,0x504F, +0x5909,0x7247,0x7BC7,0x7DE8,0x8FBA,0x8FD4,0x904D,0x4FBF, +0x52C9,0x5A29,0x5F01,0x97AD,0x4FDD,0x8217,0x92EA,0x5703, +0x6355,0x6B69,0x752B,0x88DC,0x8F14,0x7A42,0x52DF,0x5893, +0x6155,0x620A,0x66AE,0x6BCD,0x7C3F,0x83E9,0x5023,0x4FF8, +0x5305,0x5446,0x5831,0x5949,0x5B9D,0x5CF0,0x5CEF,0x5D29, +0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B, +/* plane 1 ku 43 */ +0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3,0x840C, +0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2,0x98FD, +0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A,0x59A8, +0x5E3D,0x5FD8,0x5FD9,0x623F,0x66B4,0x671B,0x67D0,0x68D2, +0x5192,0x7D21,0x80AA,0x81A8,0x8B00,0x8C8C,0x8CBF,0x927E, +0x9632,0x5420,0x982C,0x5317,0x50D5,0x535C,0x58A8,0x64B2, +0x6734,0x7267,0x7766,0x7A46,0x91E6,0x52C3,0x6CA1,0x6B86, +0x5800,0x5E4C,0x5954,0x672C,0x7FFB,0x51E1,0x76C6,0x6469, +0x78E8,0x9B54,0x9EBB,0x57CB,0x59B9,0x6627,0x679A,0x6BCE, +0x54E9,0x69D9,0x5E55,0x819C,0x6795,0x9BAA,0x67FE,0x9C52, +0x685D,0x4EA6,0x4FE3,0x53C8,0x62B9,0x672B,0x6CAB,0x8FC4, +0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80, +/* plane 1 ku 44 */ +0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC, +0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D, +0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727, +0x9D61,0x690B,0x5A7F,0x5A18,0x51A5,0x540D,0x547D,0x660E, +0x76DF,0x8FF7,0x9298,0x9CF4,0x59EA,0x725D,0x6EC5,0x514D, +0x68C9,0x7DBF,0x7DEC,0x9762,0x9EBA,0x6478,0x6A21,0x8302, +0x5984,0x5B5F,0x6BDB,0x731B,0x76F2,0x7DB2,0x8017,0x8499, +0x5132,0x6728,0x9ED9,0x76EE,0x6762,0x52FF,0x9905,0x5C24, +0x623B,0x7C7E,0x8CB0,0x554F,0x60B6,0x7D0B,0x9580,0x5301, +0x4E5F,0x51B6,0x591C,0x723A,0x8036,0x91CE,0x5F25,0x77E2, +0x5384,0x5F79,0x7D04,0x85AC,0x8A33,0x8E8D,0x9756,0x67F3, +0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652, +/* plane 1 ku 45 */ +0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB,0x5BA5, +0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67,0x6D8C, +0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A,0x9091, +0x90F5,0x96C4,0x878D,0x5915,0x4E88,0x4F59,0x4E0E,0x8A89, +0x8F3F,0x9810,0x50AD,0x5E7C,0x5996,0x5BB9,0x5EB8,0x63DA, +0x63FA,0x64C1,0x66DC,0x694A,0x69D8,0x6D0B,0x6EB6,0x7194, +0x7528,0x7AAF,0x7F8A,0x8000,0x8449,0x84C9,0x8981,0x8B21, +0x8E0A,0x9065,0x967D,0x990A,0x617E,0x6291,0x6B32,0x6C83, +0x6D74,0x7FCC,0x7FFC,0x6DC0,0x7F85,0x87BA,0x88F8,0x6765, +0x83B1,0x983C,0x96F7,0x6D1B,0x7D61,0x843D,0x916A,0x4E71, +0x5375,0x5D50,0x6B04,0x6FEB,0x85CD,0x862D,0x89A7,0x5229, +0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483, +/* plane 1 ku 46 */ +0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387, +0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409, +0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E, +0x65C5,0x865C,0x4E86,0x4EAE,0x50DA,0x4E21,0x51CC,0x5BEE, +0x6599,0x6881,0x6DBC,0x731F,0x7642,0x77AD,0x7A1C,0x7CE7, +0x826F,0x8AD2,0x907C,0x91CF,0x9675,0x9818,0x529B,0x7DD1, +0x502B,0x5398,0x6797,0x6DCB,0x71D0,0x7433,0x81E8,0x8F2A, +0x96A3,0x9C57,0x9E9F,0x7460,0x5841,0x6D99,0x7D2F,0x985E, +0x4EE4,0x4F36,0x4F8B,0x51B7,0x52B1,0x5DBA,0x601C,0x73B2, +0x793C,0x82D3,0x9234,0x96B7,0x96F6,0x970A,0x9E97,0x9F62, +0x66A6,0x6B74,0x5217,0x52A3,0x70C8,0x88C2,0x5EC9,0x604B, +0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F, +/* plane 1 ku 47 */ +0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089,0x8CC2, +0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717,0x697C, +0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001,0x807E, +0x874B,0x90CE,0x516D,0x9E93,0x7984,0x808B,0x9332,0x8AD6, +0x502D,0x548C,0x8A71,0x6B6A,0x8CC4,0x8107,0x60D1,0x67A0, +0x9DF2,0x4E99,0x4E98,0x9C10,0x8A6B,0x85C1,0x8568,0x6900, +0x6E7E,0x7897,0x8155,0x0000,0x5B41,0x5B56,0x5B7D,0x5B93, +0x5BD8,0x5BEC,0x5C12,0x5C1E,0x5C23,0x5C2B,0x378D,0x5C62, +0xFA3B,0xFA3C,0x0000,0x5C7A,0x5C8F,0x5C9F,0x5CA3,0x5CAA, +0x5CBA,0x5CCB,0x5CD0,0x5CD2,0x5CF4,0x0000,0x37E2,0x5D0D, +0x5D27,0xFA11,0x5D46,0x5D47,0x5D53,0x5D4A,0x5D6D,0x5D81, +0x5DA0,0x5DA4,0x5DA7,0x5DB8,0x5DCB,0x541E, +/* plane 1 ku 48 */ +0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F, +0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212, +0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3, +0x4EB6,0x4ECE,0x4ECD,0x4EC4,0x4EC6,0x4EC2,0x4ED7,0x4EDE, +0x4EED,0x4EDF,0x4EF7,0x4F09,0x4F5A,0x4F30,0x4F5B,0x4F5D, +0x4F57,0x4F47,0x4F76,0x4F88,0x4F8F,0x4F98,0x4F7B,0x4F69, +0x4F70,0x4F91,0x4F6F,0x4F86,0x4F96,0x5118,0x4FD4,0x4FDF, +0x4FCE,0x4FD8,0x4FDB,0x4FD1,0x4FDA,0x4FD0,0x4FE4,0x4FE5, +0x501A,0x5028,0x5014,0x502A,0x5025,0x5005,0x4F1C,0x4FF6, +0x5021,0x5029,0x502C,0x4FFE,0x4FEF,0x5011,0x5006,0x5043, +0x5047,0x6703,0x5055,0x5050,0x5048,0x505A,0x5056,0x506C, +0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2, +/* plane 1 ku 49 */ +0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5,0x50ED, +0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102,0x5116, +0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C,0x513B, +0x513F,0x5140,0x5152,0x514C,0x5154,0x5162,0x7AF8,0x5169, +0x516A,0x516E,0x5180,0x5182,0x56D8,0x518C,0x5189,0x518F, +0x5191,0x5193,0x5195,0x5196,0x51A4,0x51A6,0x51A2,0x51A9, +0x51AA,0x51AB,0x51B3,0x51B1,0x51B2,0x51B0,0x51B5,0x51BD, +0x51C5,0x51C9,0x51DB,0x51E0,0x8655,0x51E9,0x51ED,0x51F0, +0x51F5,0x51FE,0x5204,0x520B,0x5214,0x520E,0x5227,0x522A, +0x522E,0x5233,0x5239,0x524F,0x5244,0x524B,0x524C,0x525E, +0x5254,0x526A,0x5274,0x5269,0x5273,0x527F,0x527D,0x528D, +0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8, +/* plane 1 ku 50 */ +0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7, +0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8, +0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315, +0x531A,0x5323,0x532F,0x5331,0x5333,0x5338,0x5340,0x5346, +0x5345,0x4E17,0x5349,0x534D,0x51D6,0x535E,0x5369,0x536E, +0x5918,0x537B,0x5377,0x5382,0x5396,0x53A0,0x53A6,0x53A5, +0x53AE,0x53B0,0x53B6,0x53C3,0x7C12,0x96D9,0x53DF,0x66FC, +0x71EE,0x53EE,0x53E8,0x53ED,0x53FA,0x5401,0x543D,0x5440, +0x542C,0x542D,0x543C,0x542E,0x5436,0x5429,0x541D,0x544E, +0x548F,0x5475,0x548E,0x545F,0x5471,0x5477,0x5470,0x5492, +0x547B,0x5480,0x5476,0x5484,0x5490,0x5486,0x54C7,0x54A2, +0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8, +/* plane 1 ku 51 */ +0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5,0x54E6, +0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2,0x5539, +0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556,0x5557, +0x5538,0x5533,0x555D,0x5599,0x5580,0x54AF,0x558A,0x559F, +0x557B,0x557E,0x5598,0x559E,0x55AE,0x557C,0x5583,0x55A9, +0x5587,0x55A8,0x55DA,0x55C5,0x55DF,0x55C4,0x55DC,0x55E4, +0x55D4,0x5614,0x55F7,0x5616,0x55FE,0x55FD,0x561B,0x55F9, +0x564E,0x5650,0x71DF,0x5634,0x5636,0x5632,0x5638,0x566B, +0x5664,0x562F,0x566C,0x566A,0x5686,0x5680,0x568A,0x56A0, +0x5694,0x568F,0x56A5,0x56AE,0x56B6,0x56B4,0x56C2,0x56BC, +0x56C1,0x56C3,0x56C0,0x56C8,0x56CE,0x56D1,0x56D3,0x56D7, +0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709, +/* plane 1 ku 52 */ +0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C, +0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769, +0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3, +0x57A4,0x57AA,0x57B0,0x57C3,0x57C6,0x57D4,0x57D2,0x57D3, +0x580A,0x57D6,0x57E3,0x580B,0x5819,0x581D,0x5872,0x5821, +0x5862,0x584B,0x5870,0x6BC0,0x5852,0x583D,0x5879,0x5885, +0x58B9,0x589F,0x58AB,0x58BA,0x58DE,0x58BB,0x58B8,0x58AE, +0x58C5,0x58D3,0x58D1,0x58D7,0x58D9,0x58D8,0x58E5,0x58DC, +0x58E4,0x58DF,0x58EF,0x58FA,0x58F9,0x58FB,0x58FC,0x58FD, +0x5902,0x590A,0x5910,0x591B,0x68A6,0x5925,0x592C,0x592D, +0x5932,0x5938,0x593E,0x7AD2,0x5955,0x5950,0x594E,0x595A, +0x5958,0x5962,0x5960,0x5967,0x596C,0x5969, +/* plane 1 ku 53 */ +0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2,0x59C6, +0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F,0x5A11, +0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35,0x5A36, +0x5A62,0x5A6A,0x5A9A,0x5ABC,0x5ABE,0x5ACB,0x5AC2,0x5ABD, +0x5AE3,0x5AD7,0x5AE6,0x5AE9,0x5AD6,0x5AFA,0x5AFB,0x5B0C, +0x5B0B,0x5B16,0x5B32,0x5AD0,0x5B2A,0x5B36,0x5B3E,0x5B43, +0x5B45,0x5B40,0x5B51,0x5B55,0x5B5A,0x5B5B,0x5B65,0x5B69, +0x5B70,0x5B73,0x5B75,0x5B78,0x6588,0x5B7A,0x5B80,0x5B83, +0x5BA6,0x5BB8,0x5BC3,0x5BC7,0x5BC9,0x5BD4,0x5BD0,0x5BE4, +0x5BE6,0x5BE2,0x5BDE,0x5BE5,0x5BEB,0x5BF0,0x5BF6,0x5BF3, +0x5C05,0x5C07,0x5C08,0x5C0D,0x5C13,0x5C20,0x5C22,0x5C28, +0x5C38,0x5C39,0x5C41,0x5C46,0x5C4E,0x5C53, +/* plane 1 ku 54 */ +0x5C50,0x5C4F,0x5B71,0x5C6C,0x5C6E,0x4E62,0x5C76,0x5C79, +0x5C8C,0x5C91,0x5C94,0x599B,0x5CAB,0x5CBB,0x5CB6,0x5CBC, +0x5CB7,0x5CC5,0x5CBE,0x5CC7,0x5CD9,0x5CE9,0x5CFD,0x5CFA, +0x5CED,0x5D8C,0x5CEA,0x5D0B,0x5D15,0x5D17,0x5D5C,0x5D1F, +0x5D1B,0x5D11,0x5D14,0x5D22,0x5D1A,0x5D19,0x5D18,0x5D4C, +0x5D52,0x5D4E,0x5D4B,0x5D6C,0x5D73,0x5D76,0x5D87,0x5D84, +0x5D82,0x5DA2,0x5D9D,0x5DAC,0x5DAE,0x5DBD,0x5D90,0x5DB7, +0x5DBC,0x5DC9,0x5DCD,0x5DD3,0x5DD2,0x5DD6,0x5DDB,0x5DEB, +0x5DF2,0x5DF5,0x5E0B,0x5E1A,0x5E19,0x5E11,0x5E1B,0x5E36, +0x5E37,0x5E44,0x5E43,0x5E40,0x5E4E,0x5E57,0x5E54,0x5E5F, +0x5E62,0x5E64,0x5E47,0x5E75,0x5E76,0x5E7A,0x9EBC,0x5E7F, +0x5EA0,0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF, +/* plane 1 ku 55 */ +0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1,0x5EE8, +0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8,0x5EFE, +0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16,0x5F29, +0x5F2D,0x5F38,0x5F41,0x5F48,0x5F4C,0x5F4E,0x5F2F,0x5F51, +0x5F56,0x5F57,0x5F59,0x5F61,0x5F6D,0x5F73,0x5F77,0x5F83, +0x5F82,0x5F7F,0x5F8A,0x5F88,0x5F91,0x5F87,0x5F9E,0x5F99, +0x5F98,0x5FA0,0x5FA8,0x5FAD,0x5FBC,0x5FD6,0x5FFB,0x5FE4, +0x5FF8,0x5FF1,0x5FDD,0x60B3,0x5FFF,0x6021,0x6060,0x6019, +0x6010,0x6029,0x600E,0x6031,0x601B,0x6015,0x602B,0x6026, +0x600F,0x603A,0x605A,0x6041,0x606A,0x6077,0x605F,0x604A, +0x6046,0x604D,0x6063,0x6043,0x6064,0x6042,0x606C,0x606B, +0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A, +/* plane 1 ku 56 */ +0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1, +0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5, +0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4, +0x60FA,0x6103,0x6121,0x60FB,0x60F1,0x610D,0x610E,0x6147, +0x613E,0x6128,0x6127,0x614A,0x613F,0x613C,0x612C,0x6134, +0x613D,0x6142,0x6144,0x6173,0x6177,0x6158,0x6159,0x615A, +0x616B,0x6174,0x616F,0x6165,0x6171,0x615F,0x615D,0x6153, +0x6175,0x6199,0x6196,0x6187,0x61AC,0x6194,0x619A,0x618A, +0x6191,0x61AB,0x61AE,0x61CC,0x61CA,0x61C9,0x61F7,0x61C8, +0x61C3,0x61C6,0x61BA,0x61CB,0x7F79,0x61CD,0x61E6,0x61E3, +0x61F6,0x61FA,0x61F4,0x61FF,0x61FD,0x61FC,0x61FE,0x6200, +0x6208,0x6209,0x620D,0x620C,0x6214,0x621B, +/* plane 1 ku 57 */ +0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233,0x6241, +0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C,0x6282, +0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283,0x6294, +0x62D7,0x62D1,0x62BB,0x62CF,0x62FF,0x62C6,0x64D4,0x62C8, +0x62DC,0x62CC,0x62CA,0x62C2,0x62C7,0x629B,0x62C9,0x630C, +0x62EE,0x62F1,0x6327,0x6302,0x6308,0x62EF,0x62F5,0x6350, +0x633E,0x634D,0x641C,0x634F,0x6396,0x638E,0x6380,0x63AB, +0x6376,0x63A3,0x638F,0x6389,0x639F,0x63B5,0x636B,0x6369, +0x63BE,0x63E9,0x63C0,0x63C6,0x63E3,0x63C9,0x63D2,0x63F6, +0x63C4,0x6416,0x6434,0x6406,0x6413,0x6426,0x6436,0x651D, +0x6417,0x6428,0x640F,0x6467,0x646F,0x6476,0x644E,0x652A, +0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC, +/* plane 1 ku 58 */ +0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1, +0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C, +0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C, +0x6505,0x6524,0x6523,0x652B,0x6534,0x6535,0x6537,0x6536, +0x6538,0x754B,0x6548,0x6556,0x6555,0x654D,0x6558,0x655E, +0x655D,0x6572,0x6578,0x6582,0x6583,0x8B8A,0x659B,0x659F, +0x65AB,0x65B7,0x65C3,0x65C6,0x65C1,0x65C4,0x65CC,0x65D2, +0x65DB,0x65D9,0x65E0,0x65E1,0x65F1,0x6772,0x660A,0x6603, +0x65FB,0x6773,0x6635,0x6636,0x6634,0x661C,0x664F,0x6644, +0x6649,0x6641,0x665E,0x665D,0x6664,0x6667,0x6668,0x665F, +0x6662,0x6670,0x6683,0x6688,0x668E,0x6689,0x6684,0x6698, +0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC, +/* plane 1 ku 59 */ +0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6,0x66E9, +0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726,0x6727, +0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737,0x6746, +0x675E,0x6760,0x6759,0x6763,0x6764,0x6789,0x6770,0x67A9, +0x677C,0x676A,0x678C,0x678B,0x67A6,0x67A1,0x6785,0x67B7, +0x67EF,0x67B4,0x67EC,0x67B3,0x67E9,0x67B8,0x67E4,0x67DE, +0x67DD,0x67E2,0x67EE,0x67B9,0x67CE,0x67C6,0x67E7,0x6A9C, +0x681E,0x6846,0x6829,0x6840,0x684D,0x6832,0x684E,0x68B3, +0x682B,0x6859,0x6863,0x6877,0x687F,0x689F,0x688F,0x68AD, +0x6894,0x689D,0x689B,0x6883,0x6AAE,0x68B9,0x6874,0x68B5, +0x68A0,0x68BA,0x690F,0x688D,0x687E,0x6901,0x68CA,0x6908, +0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD, +/* plane 1 ku 60 */ +0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3, +0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923, +0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954, +0x697E,0x696E,0x6939,0x6974,0x693D,0x6959,0x6930,0x6961, +0x695E,0x695D,0x6981,0x696A,0x69B2,0x69AE,0x69D0,0x69BF, +0x69C1,0x69D3,0x69BE,0x69CE,0x5BE8,0x69CA,0x69DD,0x69BB, +0x69C3,0x69A7,0x6A2E,0x6991,0x69A0,0x699C,0x6995,0x69B4, +0x69DE,0x69E8,0x6A02,0x6A1B,0x69FF,0x6B0A,0x69F9,0x69F2, +0x69E7,0x6A05,0x69B1,0x6A1E,0x69ED,0x6A14,0x69EB,0x6A0A, +0x6A12,0x6AC1,0x6A23,0x6A13,0x6A44,0x6A0C,0x6A72,0x6A36, +0x6A78,0x6A47,0x6A62,0x6A59,0x6A66,0x6A48,0x6A38,0x6A22, +0x6A90,0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3, +/* plane 1 ku 61 */ +0x6A97,0x8617,0x6ABB,0x6AC3,0x6AC2,0x6AB8,0x6AB3,0x6AAC, +0x6ADE,0x6AD1,0x6ADF,0x6AAA,0x6ADA,0x6AEA,0x6AFB,0x6B05, +0x8616,0x6AFA,0x6B12,0x6B16,0x9B31,0x6B1F,0x6B38,0x6B37, +0x76DC,0x6B39,0x98EE,0x6B47,0x6B43,0x6B49,0x6B50,0x6B59, +0x6B54,0x6B5B,0x6B5F,0x6B61,0x6B78,0x6B79,0x6B7F,0x6B80, +0x6B84,0x6B83,0x6B8D,0x6B98,0x6B95,0x6B9E,0x6BA4,0x6BAA, +0x6BAB,0x6BAF,0x6BB2,0x6BB1,0x6BB3,0x6BB7,0x6BBC,0x6BC6, +0x6BCB,0x6BD3,0x6BDF,0x6BEC,0x6BEB,0x6BF3,0x6BEF,0x9EBE, +0x6C08,0x6C13,0x6C14,0x6C1B,0x6C24,0x6C23,0x6C5E,0x6C55, +0x6C62,0x6C6A,0x6C82,0x6C8D,0x6C9A,0x6C81,0x6C9B,0x6C7E, +0x6C68,0x6C73,0x6C92,0x6C90,0x6CC4,0x6CF1,0x6CD3,0x6CBD, +0x6CD7,0x6CC5,0x6CDD,0x6CAE,0x6CB1,0x6CBE, +/* plane 1 ku 62 */ +0x6CBA,0x6CDB,0x6CEF,0x6CD9,0x6CEA,0x6D1F,0x884D,0x6D36, +0x6D2B,0x6D3D,0x6D38,0x6D19,0x6D35,0x6D33,0x6D12,0x6D0C, +0x6D63,0x6D93,0x6D64,0x6D5A,0x6D79,0x6D59,0x6D8E,0x6D95, +0x6FE4,0x6D85,0x6DF9,0x6E15,0x6E0A,0x6DB5,0x6DC7,0x6DE6, +0x6DB8,0x6DC6,0x6DEC,0x6DDE,0x6DCC,0x6DE8,0x6DD2,0x6DC5, +0x6DFA,0x6DD9,0x6DE4,0x6DD5,0x6DEA,0x6DEE,0x6E2D,0x6E6E, +0x6E2E,0x6E19,0x6E72,0x6E5F,0x6E3E,0x6E23,0x6E6B,0x6E2B, +0x6E76,0x6E4D,0x6E1F,0x6E43,0x6E3A,0x6E4E,0x6E24,0x6EFF, +0x6E1D,0x6E38,0x6E82,0x6EAA,0x6E98,0x6EC9,0x6EB7,0x6ED3, +0x6EBD,0x6EAF,0x6EC4,0x6EB2,0x6ED4,0x6ED5,0x6E8F,0x6EA5, +0x6EC2,0x6E9F,0x6F41,0x6F11,0x704C,0x6EEC,0x6EF8,0x6EFE, +0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC, +/* plane 1 ku 63 */ +0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80, +0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E, +0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9, +0x6FC6,0x6FAA,0x6FDF,0x6FD5,0x6FEC,0x6FD4,0x6FD8,0x6FF1, +0x6FEE,0x6FDB,0x7009,0x700B,0x6FFA,0x7011,0x7001,0x700F, +0x6FFE,0x701B,0x701A,0x6F74,0x701D,0x7018,0x701F,0x7030, +0x703E,0x7032,0x7051,0x7063,0x7099,0x7092,0x70AF,0x70F1, +0x70AC,0x70B8,0x70B3,0x70AE,0x70DF,0x70CB,0x70DD,0x70D9, +0x7109,0x70FD,0x711C,0x7119,0x7165,0x7155,0x7188,0x7166, +0x7162,0x714C,0x7156,0x716C,0x718F,0x71FB,0x7184,0x7195, +0x71A8,0x71AC,0x71D7,0x71B9,0x71BE,0x71D2,0x71C9,0x71D4, +0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC, +/* plane 1 ku 64 */ +0x71F9,0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C, +0x7230,0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B, +0x7258,0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296, +0x72A2,0x72A7,0x72B9,0x72B2,0x72C3,0x72C6,0x72C4,0x72CE, +0x72D2,0x72E2,0x72E0,0x72E1,0x72F9,0x72F7,0x500F,0x7317, +0x730A,0x731C,0x7316,0x731D,0x7334,0x732F,0x7329,0x7325, +0x733E,0x734E,0x734F,0x9ED8,0x7357,0x736A,0x7368,0x7370, +0x7378,0x7375,0x737B,0x737A,0x73C8,0x73B3,0x73CE,0x73BB, +0x73C0,0x73E5,0x73EE,0x73DE,0x74A2,0x7405,0x746F,0x7425, +0x73F8,0x7432,0x743A,0x7455,0x743F,0x745F,0x7459,0x7441, +0x745C,0x7469,0x7470,0x7463,0x746A,0x7476,0x747E,0x748B, +0x749E,0x74A7,0x74CA,0x74CF,0x74D4,0x73F1, +/* plane 1 ku 65 */ +0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1, +0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D, +0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D, +0x754A,0x7549,0x755B,0x7546,0x755A,0x7569,0x7564,0x7567, +0x756B,0x756D,0x7578,0x7576,0x7586,0x7587,0x7574,0x758A, +0x7589,0x7582,0x7594,0x759A,0x759D,0x75A5,0x75A3,0x75C2, +0x75B3,0x75C3,0x75B5,0x75BD,0x75B8,0x75BC,0x75B1,0x75CD, +0x75CA,0x75D2,0x75D9,0x75E3,0x75DE,0x75FE,0x75FF,0x75FC, +0x7601,0x75F0,0x75FA,0x75F2,0x75F3,0x760B,0x760D,0x7609, +0x761F,0x7627,0x7620,0x7621,0x7622,0x7624,0x7634,0x7630, +0x763B,0x7647,0x7648,0x7646,0x765C,0x7658,0x7661,0x7662, +0x7668,0x7669,0x766A,0x7667,0x766C,0x7670, +/* plane 1 ku 66 */ +0x7672,0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B, +0x768E,0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8, +0x76B9,0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1, +0x76E5,0x76E7,0x76EA,0x862F,0x76FB,0x7708,0x7707,0x7704, +0x7729,0x7724,0x771E,0x7725,0x7726,0x771B,0x7737,0x7738, +0x7747,0x775A,0x7768,0x776B,0x775B,0x7765,0x777F,0x777E, +0x7779,0x778E,0x778B,0x7791,0x77A0,0x779E,0x77B0,0x77B6, +0x77B9,0x77BF,0x77BC,0x77BD,0x77BB,0x77C7,0x77CD,0x77D7, +0x77DA,0x77DC,0x77E3,0x77EE,0x77FC,0x780C,0x7812,0x7926, +0x7820,0x792A,0x7845,0x788E,0x7874,0x7886,0x787C,0x789A, +0x788C,0x78A3,0x78B5,0x78AA,0x78AF,0x78D1,0x78C6,0x78CB, +0x78D4,0x78BE,0x78BC,0x78C5,0x78CA,0x78EC, +/* plane 1 ku 67 */ +0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919, +0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955, +0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA, +0x79AE,0x79B3,0x79B9,0x79BA,0x79C9,0x79D5,0x79E7,0x79EC, +0x79E1,0x79E3,0x7A08,0x7A0D,0x7A18,0x7A19,0x7A20,0x7A1F, +0x7980,0x7A31,0x7A3B,0x7A3E,0x7A37,0x7A43,0x7A57,0x7A49, +0x7A61,0x7A62,0x7A69,0x9F9D,0x7A70,0x7A79,0x7A7D,0x7A88, +0x7A97,0x7A95,0x7A98,0x7A96,0x7AA9,0x7AC8,0x7AB0,0x7AB6, +0x7AC5,0x7AC4,0x7ABF,0x9083,0x7AC7,0x7ACA,0x7ACD,0x7ACF, +0x7AD5,0x7AD3,0x7AD9,0x7ADA,0x7ADD,0x7AE1,0x7AE2,0x7AE6, +0x7AED,0x7AF0,0x7B02,0x7B0F,0x7B0A,0x7B06,0x7B33,0x7B18, +0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50, +/* plane 1 ku 68 */ +0x7B7A,0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65, +0x7B74,0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98, +0x7B9F,0x7B8D,0x7B9C,0x7B9A,0x7B8B,0x7B92,0x7B8F,0x7B5D, +0x7B99,0x7BCB,0x7BC1,0x7BCC,0x7BCF,0x7BB4,0x7BC6,0x7BDD, +0x7BE9,0x7C11,0x7C14,0x7BE6,0x7BE5,0x7C60,0x7C00,0x7C07, +0x7C13,0x7BF3,0x7BF7,0x7C17,0x7C0D,0x7BF6,0x7C23,0x7C27, +0x7C2A,0x7C1F,0x7C37,0x7C2B,0x7C3D,0x7C4C,0x7C43,0x7C54, +0x7C4F,0x7C40,0x7C50,0x7C58,0x7C5F,0x7C64,0x7C56,0x7C65, +0x7C6C,0x7C75,0x7C83,0x7C90,0x7CA4,0x7CAD,0x7CA2,0x7CAB, +0x7CA1,0x7CA8,0x7CB3,0x7CB2,0x7CB1,0x7CAE,0x7CB9,0x7CBD, +0x7CC0,0x7CC5,0x7CC2,0x7CD8,0x7CD2,0x7CDC,0x7CE2,0x9B3B, +0x7CEF,0x7CF2,0x7CF4,0x7CF6,0x7CFA,0x7D06, +/* plane 1 ku 69 */ +0x7D02,0x7D1C,0x7D15,0x7D0A,0x7D45,0x7D4B,0x7D2E,0x7D32, +0x7D3F,0x7D35,0x7D46,0x7D73,0x7D56,0x7D4E,0x7D72,0x7D68, +0x7D6E,0x7D4F,0x7D63,0x7D93,0x7D89,0x7D5B,0x7D8F,0x7D7D, +0x7D9B,0x7DBA,0x7DAE,0x7DA3,0x7DB5,0x7DC7,0x7DBD,0x7DAB, +0x7E3D,0x7DA2,0x7DAF,0x7DDC,0x7DB8,0x7D9F,0x7DB0,0x7DD8, +0x7DDD,0x7DE4,0x7DDE,0x7DFB,0x7DF2,0x7DE1,0x7E05,0x7E0A, +0x7E23,0x7E21,0x7E12,0x7E31,0x7E1F,0x7E09,0x7E0B,0x7E22, +0x7E46,0x7E66,0x7E3B,0x7E35,0x7E39,0x7E43,0x7E37,0x7E32, +0x7E3A,0x7E67,0x7E5D,0x7E56,0x7E5E,0x7E59,0x7E5A,0x7E79, +0x7E6A,0x7E69,0x7E7C,0x7E7B,0x7E83,0x7DD5,0x7E7D,0x8FAE, +0x7E7F,0x7E88,0x7E89,0x7E8C,0x7E92,0x7E90,0x7E93,0x7E94, +0x7E96,0x7E8E,0x7E9B,0x7E9C,0x7F38,0x7F3A, +/* plane 1 ku 70 */ +0x7F45,0x7F4C,0x7F4D,0x7F4E,0x7F50,0x7F51,0x7F55,0x7F54, +0x7F58,0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82, +0x7F86,0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D, +0x7F9A,0x7FA3,0x7FAF,0x7FB2,0x7FB9,0x7FAE,0x7FB6,0x7FB8, +0x8B71,0x7FC5,0x7FC6,0x7FCA,0x7FD5,0x7FD4,0x7FE1,0x7FE6, +0x7FE9,0x7FF3,0x7FF9,0x98DC,0x8006,0x8004,0x800B,0x8012, +0x8018,0x8019,0x801C,0x8021,0x8028,0x803F,0x803B,0x804A, +0x8046,0x8052,0x8058,0x805A,0x805F,0x8062,0x8068,0x8073, +0x8072,0x8070,0x8076,0x8079,0x807D,0x807F,0x8084,0x8086, +0x8085,0x809B,0x8093,0x809A,0x80AD,0x5190,0x80AC,0x80DB, +0x80E5,0x80D9,0x80DD,0x80C4,0x80DA,0x80D6,0x8109,0x80EF, +0x80F1,0x811B,0x8129,0x8123,0x812F,0x814B, +/* plane 1 ku 71 */ +0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E, +0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182, +0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0, +0x81B5,0x81BE,0x81B8,0x81BD,0x81C0,0x81C2,0x81BA,0x81C9, +0x81CD,0x81D1,0x81D9,0x81D8,0x81C8,0x81DA,0x81DF,0x81E0, +0x81E7,0x81FA,0x81FB,0x81FE,0x8201,0x8202,0x8205,0x8207, +0x820A,0x820D,0x8210,0x8216,0x8229,0x822B,0x8238,0x8233, +0x8240,0x8259,0x8258,0x825D,0x825A,0x825F,0x8264,0x8262, +0x8268,0x826A,0x826B,0x822E,0x8271,0x8277,0x8278,0x827E, +0x828D,0x8292,0x82AB,0x829F,0x82BB,0x82AC,0x82E1,0x82E3, +0x82DF,0x82D2,0x82F4,0x82F3,0x82FA,0x8393,0x8303,0x82FB, +0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9, +/* plane 1 ku 72 */ +0x8335,0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350, +0x8345,0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA, +0x839F,0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C, +0x83B5,0x8373,0x8375,0x83A0,0x8389,0x83A8,0x83F4,0x8413, +0x83EB,0x83CE,0x83FD,0x8403,0x83D8,0x840B,0x83C1,0x83F7, +0x8407,0x83E0,0x83F2,0x840D,0x8422,0x8420,0x83BD,0x8438, +0x8506,0x83FB,0x846D,0x842A,0x843C,0x855A,0x8484,0x8477, +0x846B,0x84AD,0x846E,0x8482,0x8469,0x8446,0x842C,0x846F, +0x8479,0x8435,0x84CA,0x8462,0x84B9,0x84BF,0x849F,0x84D9, +0x84CD,0x84BB,0x84DA,0x84D0,0x84C1,0x84C6,0x84D6,0x84A1, +0x8521,0x84FF,0x84F4,0x8517,0x8518,0x852C,0x851F,0x8515, +0x8514,0x84FC,0x8540,0x8563,0x8558,0x8548, +/* plane 1 ku 73 */ +0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591, +0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C, +0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0, +0x85D5,0x85DD,0x85E5,0x85DC,0x85F9,0x860A,0x8613,0x860B, +0x85FE,0x85FA,0x8606,0x8622,0x861A,0x8630,0x863F,0x864D, +0x4E55,0x8654,0x865F,0x8667,0x8671,0x8693,0x86A3,0x86A9, +0x86AA,0x868B,0x868C,0x86B6,0x86AF,0x86C4,0x86C6,0x86B0, +0x86C9,0x8823,0x86AB,0x86D4,0x86DE,0x86E9,0x86EC,0x86DF, +0x86DB,0x86EF,0x8712,0x8706,0x8708,0x8700,0x8703,0x86FB, +0x8711,0x8709,0x870D,0x86F9,0x870A,0x8734,0x873F,0x8737, +0x873B,0x8725,0x8729,0x871A,0x8760,0x875F,0x8778,0x874C, +0x874E,0x8774,0x8757,0x8768,0x876E,0x8759, +/* plane 1 ku 74 */ +0x8753,0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF, +0x87CB,0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3, +0x87C7,0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D, +0x87FE,0x87F6,0x87F7,0x880E,0x87D2,0x8811,0x8816,0x8815, +0x8822,0x8821,0x8831,0x8836,0x8839,0x8827,0x883B,0x8844, +0x8842,0x8852,0x8859,0x885E,0x8862,0x886B,0x8881,0x887E, +0x889E,0x8875,0x887D,0x88B5,0x8872,0x8882,0x8897,0x8892, +0x88AE,0x8899,0x88A2,0x888D,0x88A4,0x88B0,0x88BF,0x88B1, +0x88C3,0x88C4,0x88D4,0x88D8,0x88D9,0x88DD,0x88F9,0x8902, +0x88FC,0x88F4,0x88E8,0x88F2,0x8904,0x890C,0x890A,0x8913, +0x8943,0x891E,0x8925,0x892A,0x892B,0x8941,0x8944,0x893B, +0x8936,0x8938,0x894C,0x891D,0x8960,0x895E, +/* plane 1 ku 75 */ +0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E, +0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6, +0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA, +0x89DC,0x89DD,0x89E7,0x89F4,0x89F8,0x8A03,0x8A16,0x8A10, +0x8A0C,0x8A1B,0x8A1D,0x8A25,0x8A36,0x8A41,0x8A5B,0x8A52, +0x8A46,0x8A48,0x8A7C,0x8A6D,0x8A6C,0x8A62,0x8A85,0x8A82, +0x8A84,0x8AA8,0x8AA1,0x8A91,0x8AA5,0x8AA6,0x8A9A,0x8AA3, +0x8AC4,0x8ACD,0x8AC2,0x8ADA,0x8AEB,0x8AF3,0x8AE7,0x8AE4, +0x8AF1,0x8B14,0x8AE0,0x8AE2,0x8AF7,0x8ADE,0x8ADB,0x8B0C, +0x8B07,0x8B1A,0x8AE1,0x8B16,0x8B10,0x8B17,0x8B20,0x8B33, +0x97AB,0x8B26,0x8B2B,0x8B3E,0x8B28,0x8B41,0x8B4C,0x8B4F, +0x8B4E,0x8B49,0x8B56,0x8B5B,0x8B5A,0x8B6B, +/* plane 1 ku 76 */ +0x8B5F,0x8B6C,0x8B6F,0x8B74,0x8B7D,0x8B80,0x8B8C,0x8B8E, +0x8B92,0x8B93,0x8B96,0x8B99,0x8B9A,0x8C3A,0x8C41,0x8C3F, +0x8C48,0x8C4C,0x8C4E,0x8C50,0x8C55,0x8C62,0x8C6C,0x8C78, +0x8C7A,0x8C82,0x8C89,0x8C85,0x8C8A,0x8C8D,0x8C8E,0x8C94, +0x8C7C,0x8C98,0x621D,0x8CAD,0x8CAA,0x8CBD,0x8CB2,0x8CB3, +0x8CAE,0x8CB6,0x8CC8,0x8CC1,0x8CE4,0x8CE3,0x8CDA,0x8CFD, +0x8CFA,0x8CFB,0x8D04,0x8D05,0x8D0A,0x8D07,0x8D0F,0x8D0D, +0x8D10,0x9F4E,0x8D13,0x8CCD,0x8D14,0x8D16,0x8D67,0x8D6D, +0x8D71,0x8D73,0x8D81,0x8D99,0x8DC2,0x8DBE,0x8DBA,0x8DCF, +0x8DDA,0x8DD6,0x8DCC,0x8DDB,0x8DCB,0x8DEA,0x8DEB,0x8DDF, +0x8DE3,0x8DFC,0x8E08,0x8E09,0x8DFF,0x8E1D,0x8E1E,0x8E10, +0x8E1F,0x8E42,0x8E35,0x8E30,0x8E34,0x8E4A, +/* plane 1 ku 77 */ +0x8E47,0x8E49,0x8E4C,0x8E50,0x8E48,0x8E59,0x8E64,0x8E60, +0x8E2A,0x8E63,0x8E55,0x8E76,0x8E72,0x8E7C,0x8E81,0x8E87, +0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99, +0x8EAA,0x8EA1,0x8EAC,0x8EB0,0x8EC6,0x8EB1,0x8EBE,0x8EC5, +0x8EC8,0x8ECB,0x8EDB,0x8EE3,0x8EFC,0x8EFB,0x8EEB,0x8EFE, +0x8F0A,0x8F05,0x8F15,0x8F12,0x8F19,0x8F13,0x8F1C,0x8F1F, +0x8F1B,0x8F0C,0x8F26,0x8F33,0x8F3B,0x8F39,0x8F45,0x8F42, +0x8F3E,0x8F4C,0x8F49,0x8F46,0x8F4E,0x8F57,0x8F5C,0x8F62, +0x8F63,0x8F64,0x8F9C,0x8F9F,0x8FA3,0x8FAD,0x8FAF,0x8FB7, +0x8FDA,0x8FE5,0x8FE2,0x8FEA,0x8FEF,0x9087,0x8FF4,0x9005, +0x8FF9,0x8FFA,0x9011,0x9015,0x9021,0x900D,0x901E,0x9016, +0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8, +/* plane 1 ku 78 */ +0x904F,0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056, +0x9058,0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082, +0x907D,0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF, +0x90B1,0x90B5,0x90E2,0x90E4,0x6248,0x90DB,0x9102,0x9112, +0x9119,0x9132,0x9130,0x914A,0x9156,0x9158,0x9163,0x9165, +0x9169,0x9173,0x9172,0x918B,0x9189,0x9182,0x91A2,0x91AB, +0x91AF,0x91AA,0x91B5,0x91B4,0x91BA,0x91C0,0x91C1,0x91C9, +0x91CB,0x91D0,0x91D6,0x91DF,0x91E1,0x91DB,0x91FC,0x91F5, +0x91F6,0x921E,0x91FF,0x9214,0x922C,0x9215,0x9211,0x925E, +0x9257,0x9245,0x9249,0x9264,0x9248,0x9295,0x923F,0x924B, +0x9250,0x929C,0x9296,0x9293,0x929B,0x925A,0x92CF,0x92B9, +0x92B7,0x92E9,0x930F,0x92FA,0x9344,0x932E, +/* plane 1 ku 79 */ +0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C, +0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394, +0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD, +0x93D0,0x93C8,0x93E4,0x941A,0x9414,0x9413,0x9403,0x9407, +0x9410,0x9436,0x942B,0x9435,0x9421,0x943A,0x9441,0x9452, +0x9444,0x945B,0x9460,0x9462,0x945E,0x946A,0x9229,0x9470, +0x9475,0x9477,0x947D,0x945A,0x947C,0x947E,0x9481,0x947F, +0x9582,0x9587,0x958A,0x9594,0x9596,0x9598,0x9599,0x95A0, +0x95A8,0x95A7,0x95AD,0x95BC,0x95BB,0x95B9,0x95BE,0x95CA, +0x6FF6,0x95C3,0x95CD,0x95CC,0x95D5,0x95D4,0x95D6,0x95DC, +0x95E1,0x95E5,0x95E2,0x9621,0x9628,0x962E,0x962F,0x9642, +0x964C,0x964F,0x964B,0x9677,0x965C,0x965E, +/* plane 1 ku 80 */ +0x965D,0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695, +0x9697,0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6, +0x96B8,0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC, +0x970D,0x96D5,0x96F9,0x9704,0x9706,0x9708,0x9713,0x970E, +0x9711,0x970F,0x9716,0x9719,0x9724,0x972A,0x9730,0x9739, +0x973D,0x973E,0x9744,0x9746,0x9748,0x9742,0x9749,0x975C, +0x9760,0x9764,0x9766,0x9768,0x52D2,0x976B,0x9771,0x9779, +0x9785,0x977C,0x9781,0x977A,0x9786,0x978B,0x978F,0x9790, +0x979C,0x97A8,0x97A6,0x97A3,0x97B3,0x97B4,0x97C3,0x97C6, +0x97C8,0x97CB,0x97DC,0x97ED,0x9F4F,0x97F2,0x7ADF,0x97F6, +0x97F5,0x980F,0x980C,0x9838,0x9824,0x9821,0x9837,0x983D, +0x9846,0x984F,0x984B,0x986B,0x986F,0x9870, +/* plane 1 ku 81 */ +0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4, +0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914, +0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E, +0x993D,0x993E,0x9942,0x9949,0x9945,0x9950,0x994B,0x9951, +0x9952,0x994C,0x9955,0x9997,0x9998,0x99A5,0x99AD,0x99AE, +0x99BC,0x99DF,0x99DB,0x99DD,0x99D8,0x99D1,0x99ED,0x99EE, +0x99F1,0x99F2,0x99FB,0x99F8,0x9A01,0x9A0F,0x9A05,0x99E2, +0x9A19,0x9A2B,0x9A37,0x9A45,0x9A42,0x9A40,0x9A43,0x9A3E, +0x9A55,0x9A4D,0x9A5B,0x9A57,0x9A5F,0x9A62,0x9A65,0x9A64, +0x9A69,0x9A6B,0x9A6A,0x9AAD,0x9AB0,0x9ABC,0x9AC0,0x9ACF, +0x9AD1,0x9AD3,0x9AD4,0x9ADE,0x9ADF,0x9AE2,0x9AE3,0x9AE6, +0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF7, +/* plane 1 ku 82 */ +0x9AFB,0x9B06,0x9B18,0x9B1A,0x9B1F,0x9B22,0x9B23,0x9B25, +0x9B27,0x9B28,0x9B29,0x9B2A,0x9B2E,0x9B2F,0x9B32,0x9B44, +0x9B43,0x9B4F,0x9B4D,0x9B4E,0x9B51,0x9B58,0x9B74,0x9B93, +0x9B83,0x9B91,0x9B96,0x9B97,0x9B9F,0x9BA0,0x9BA8,0x9BB4, +0x9BC0,0x9BCA,0x9BB9,0x9BC6,0x9BCF,0x9BD1,0x9BD2,0x9BE3, +0x9BE2,0x9BE4,0x9BD4,0x9BE1,0x9C3A,0x9BF2,0x9BF1,0x9BF0, +0x9C15,0x9C14,0x9C09,0x9C13,0x9C0C,0x9C06,0x9C08,0x9C12, +0x9C0A,0x9C04,0x9C2E,0x9C1B,0x9C25,0x9C24,0x9C21,0x9C30, +0x9C47,0x9C32,0x9C46,0x9C3E,0x9C5A,0x9C60,0x9C67,0x9C76, +0x9C78,0x9CE7,0x9CEC,0x9CF0,0x9D09,0x9D08,0x9CEB,0x9D03, +0x9D06,0x9D2A,0x9D26,0x9DAF,0x9D23,0x9D1F,0x9D44,0x9D15, +0x9D12,0x9D41,0x9D3F,0x9D3E,0x9D46,0x9D48, +/* plane 1 ku 83 */ +0x9D5D,0x9D5E,0x9D64,0x9D51,0x9D50,0x9D59,0x9D72,0x9D89, +0x9D87,0x9DAB,0x9D6F,0x9D7A,0x9D9A,0x9DA4,0x9DA9,0x9DB2, +0x9DC4,0x9DC1,0x9DBB,0x9DB8,0x9DBA,0x9DC6,0x9DCF,0x9DC2, +0x9DD9,0x9DD3,0x9DF8,0x9DE6,0x9DED,0x9DEF,0x9DFD,0x9E1A, +0x9E1B,0x9E1E,0x9E75,0x9E79,0x9E7D,0x9E81,0x9E88,0x9E8B, +0x9E8C,0x9E92,0x9E95,0x9E91,0x9E9D,0x9EA5,0x9EA9,0x9EB8, +0x9EAA,0x9EAD,0x9761,0x9ECC,0x9ECE,0x9ECF,0x9ED0,0x9ED4, +0x9EDC,0x9EDE,0x9EDD,0x9EE0,0x9EE5,0x9EE8,0x9EEF,0x9EF4, +0x9EF6,0x9EF7,0x9EF9,0x9EFB,0x9EFC,0x9EFD,0x9F07,0x9F08, +0x76B7,0x9F15,0x9F21,0x9F2C,0x9F3E,0x9F4A,0x9F52,0x9F54, +0x9F63,0x9F5F,0x9F60,0x9F61,0x9F66,0x9F67,0x9F6C,0x9F6A, +0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0, +/* plane 1 ku 84 */ +0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199,0x5653,0x5DE2, +0x5E14,0x5E18,0x5E58,0x5E5E,0x5EBE,0xF928,0x5ECB,0x5EF9, +0x5F00,0x5F02,0x5F07,0x5F1D,0x5F23,0x5F34,0x5F36,0x5F3D, +0x5F40,0x5F45,0x5F54,0x5F58,0x5F64,0x5F67,0x5F7D,0x5F89, +0x5F9C,0x5FA7,0x5FAF,0x5FB5,0x5FB7,0x5FC9,0x5FDE,0x5FE1, +0x5FE9,0x600D,0x6014,0x6018,0x6033,0x6035,0x6047,0xFA3D, +0x609D,0x609E,0x60CB,0x60D4,0x60D5,0x60DD,0x60F8,0x611C, +0x612B,0x6130,0x6137,0xFA3E,0x618D,0xFA3F,0x61BC,0x61B9, +0xFA40,0x6222,0x623E,0x6243,0x6256,0x625A,0x626F,0x6285, +0x62C4,0x62D6,0x62FC,0x630A,0x6318,0x6339,0x6343,0x6365, +0x637C,0x63E5,0x63ED,0x63F5,0x6410,0x6414,0x6422,0x6479, +0x6451,0x6460,0x646D,0x64CE,0x64BE,0x64BF, +/* plane 1 ku 85 */ +0x64C4,0x64CA,0x64D0,0x64F7,0x64FB,0x6522,0x6529,0xFA41, +0x6567,0x659D,0xFA42,0x6600,0x6609,0x6615,0x661E,0x663A, +0x6622,0x6624,0x662B,0x6630,0x6631,0x6633,0x66FB,0x6648, +0x664C,0x0000,0x6659,0x665A,0x6661,0x6665,0x6673,0x6677, +0x6678,0x668D,0xFA43,0x66A0,0x66B2,0x66BB,0x66C6,0x66C8, +0x3B22,0x66DB,0x66E8,0x66FA,0x6713,0xF929,0x6733,0x6766, +0x6747,0x6748,0x677B,0x6781,0x6793,0x6798,0x679B,0x67BB, +0x67F9,0x67C0,0x67D7,0x67FC,0x6801,0x6852,0x681D,0x682C, +0x6831,0x685B,0x6872,0x6875,0xFA44,0x68A3,0x68A5,0x68B2, +0x68C8,0x68D0,0x68E8,0x68ED,0x68F0,0x68F1,0x68FC,0x690A, +0x6949,0x0000,0x6935,0x6942,0x6957,0x6963,0x6964,0x6968, +0x6980,0xFA14,0x69A5,0x69AD,0x69CF,0x3BB6, +/* plane 1 ku 86 */ +0x3BC3,0x69E2,0x69E9,0x69EA,0x69F5,0x69F6,0x6A0F,0x6A15, +0x0000,0x6A3B,0x6A3E,0x6A45,0x6A50,0x6A56,0x6A5B,0x6A6B, +0x6A73,0x0000,0x6A89,0x6A94,0x6A9D,0x6A9E,0x6AA5,0x6AE4, +0x6AE7,0x3C0F,0xF91D,0x6B1B,0x6B1E,0x6B2C,0x6B35,0x6B46, +0x6B56,0x6B60,0x6B65,0x6B67,0x6B77,0x6B82,0x6BA9,0x6BAD, +0xF970,0x6BCF,0x6BD6,0x6BD7,0x6BFF,0x6C05,0x6C10,0x6C33, +0x6C59,0x6C5C,0x6CAA,0x6C74,0x6C76,0x6C85,0x6C86,0x6C98, +0x6C9C,0x6CFB,0x6CC6,0x6CD4,0x6CE0,0x6CEB,0x6CEE,0x0000, +0x6D04,0x6D0E,0x6D2E,0x6D31,0x6D39,0x6D3F,0x6D58,0x6D65, +0xFA45,0x6D82,0x6D87,0x6D89,0x6D94,0x6DAA,0x6DAC,0x6DBF, +0x6DC4,0x6DD6,0x6DDA,0x6DDB,0x6DDD,0x6DFC,0xFA46,0x6E34, +0x6E44,0x6E5C,0x6E5E,0x6EAB,0x6EB1,0x6EC1, +/* plane 1 ku 87 */ +0x6EC7,0x6ECE,0x6F10,0x6F1A,0xFA47,0x6F2A,0x6F2F,0x6F33, +0x6F51,0x6F59,0x6F5E,0x6F61,0x6F62,0x6F7E,0x6F88,0x6F8C, +0x6F8D,0x6F94,0x6FA0,0x6FA7,0x6FB6,0x6FBC,0x6FC7,0x6FCA, +0x6FF9,0x6FF0,0x6FF5,0x7005,0x7006,0x7028,0x704A,0x705D, +0x705E,0x704E,0x7064,0x7075,0x7085,0x70A4,0x70AB,0x70B7, +0x70D4,0x70D8,0x70E4,0x710F,0x712B,0x711E,0x7120,0x712E, +0x7130,0x7146,0x7147,0x7151,0xFA48,0x7152,0x715C,0x7160, +0x7168,0xFA15,0x7185,0x7187,0x7192,0x71C1,0x71BA,0x71C4, +0x71FE,0x7200,0x7215,0x7255,0x7256,0x3E3F,0x728D,0x729B, +0x72BE,0x72C0,0x72FB,0x0000,0x7327,0x7328,0xFA16,0x7350, +0x7366,0x737C,0x7395,0x739F,0x73A0,0x73A2,0x73A6,0x73AB, +0x73C9,0x73CF,0x73D6,0x73D9,0x73E3,0x73E9, +/* plane 1 ku 88 */ +0x7407,0x740A,0x741A,0x741B,0xFA4A,0x7426,0x7428,0x742A, +0x742B,0x742C,0x742E,0x742F,0x7430,0x7444,0x7446,0x7447, +0x744B,0x7457,0x7462,0x746B,0x746D,0x7486,0x7487,0x7489, +0x7498,0x749C,0x749F,0x74A3,0x7490,0x74A6,0x74A8,0x74A9, +0x74B5,0x74BF,0x74C8,0x74C9,0x74DA,0x74FF,0x7501,0x7517, +0x752F,0x756F,0x7579,0x7592,0x3F72,0x75CE,0x75E4,0x7600, +0x7602,0x7608,0x7615,0x7616,0x7619,0x761E,0x762D,0x7635, +0x7643,0x764B,0x7664,0x7665,0x766D,0x766F,0x7671,0x7681, +0x769B,0x769D,0x769E,0x76A6,0x76AA,0x76B6,0x76C5,0x76CC, +0x76CE,0x76D4,0x76E6,0x76F1,0x76FC,0x770A,0x7719,0x7734, +0x7736,0x7746,0x774D,0x774E,0x775C,0x775F,0x7762,0x777A, +0x7780,0x7794,0x77AA,0x77E0,0x782D,0x0000, +/* plane 1 ku 89 */ +0x7843,0x784E,0x784F,0x7851,0x7868,0x786E,0xFA4B,0x78B0, +0x0000,0x78AD,0x78E4,0x78F2,0x7900,0x78F7,0x791C,0x792E, +0x7931,0x7934,0xFA4C,0xFA4D,0x7945,0x7946,0xFA4E,0xFA4F, +0xFA50,0x795C,0xFA51,0xFA19,0xFA1A,0x7979,0xFA52,0xFA53, +0xFA1B,0x7998,0x79B1,0x79B8,0x79C8,0x79CA,0x0000,0x79D4, +0x79DE,0x79EB,0x79ED,0x7A03,0xFA54,0x7A39,0x7A5D,0x7A6D, +0xFA55,0x7A85,0x7AA0,0x0000,0x7AB3,0x7ABB,0x7ACE,0x7AEB, +0x7AFD,0x7B12,0x7B2D,0x7B3B,0x7B47,0x7B4E,0x7B60,0x7B6D, +0x7B6F,0x7B72,0x7B9E,0xFA56,0x7BD7,0x7BD9,0x7C01,0x7C31, +0x7C1E,0x7C20,0x7C33,0x7C36,0x4264,0x0000,0x7C59,0x7C6D, +0x7C79,0x7C8F,0x7C94,0x7CA0,0x7CBC,0x7CD5,0x7CD9,0x7CDD, +0x7D07,0x7D08,0x7D13,0x7D1D,0x7D23,0x7D31, +/* plane 1 ku 90 */ +0x7D41,0x7D48,0x7D53,0x7D5C,0x7D7A,0x7D83,0x7D8B,0x7DA0, +0x7DA6,0x7DC2,0x7DCC,0x7DD6,0x7DE3,0xFA57,0x7E28,0x7E08, +0x7E11,0x7E15,0xFA59,0x7E47,0x7E52,0x7E61,0x7E8A,0x7E8D, +0x7F47,0xFA5A,0x7F91,0x7F97,0x7FBF,0x7FCE,0x7FDB,0x7FDF, +0x7FEC,0x7FEE,0x7FFA,0xFA5B,0x8014,0x8026,0x8035,0x8037, +0x803C,0x80CA,0x80D7,0x80E0,0x80F3,0x8118,0x814A,0x8160, +0x8167,0x8168,0x816D,0x81BB,0x81CA,0x81CF,0x81D7,0xFA5C, +0x4453,0x445B,0x8260,0x8274,0x0000,0x828E,0x82A1,0x82A3, +0x82A4,0x82A9,0x82AE,0x82B7,0x82BE,0x82BF,0x82C6,0x82D5, +0x82FD,0x82FE,0x8300,0x8301,0x8362,0x8322,0x832D,0x833A, +0x8343,0x8347,0x8351,0x8355,0x837D,0x8386,0x8392,0x8398, +0x83A7,0x83A9,0x83BF,0x83C0,0x83C7,0x83CF, +/* plane 1 ku 91 */ +0x83D1,0x83E1,0x83EA,0x8401,0x8406,0x840A,0xFA5F,0x8448, +0x845F,0x8470,0x8473,0x8485,0x849E,0x84AF,0x84B4,0x84BA, +0x84C0,0x84C2,0x0000,0x8532,0x851E,0x8523,0x852F,0x8559, +0x8564,0xFA1F,0x85AD,0x857A,0x858C,0x858F,0x85A2,0x85B0, +0x85CB,0x85CE,0x85ED,0x8612,0x85FF,0x8604,0x8605,0x8610, +0x0000,0x8618,0x8629,0x8638,0x8657,0x865B,0xF936,0x8662, +0x459D,0x866C,0x8675,0x8698,0x86B8,0x86FA,0x86FC,0x86FD, +0x870B,0x8771,0x8787,0x8788,0x87AC,0x87AD,0x87B5,0x45EA, +0x87D6,0x87EC,0x8806,0x880A,0x8810,0x8814,0x881F,0x8898, +0x88AA,0x88CA,0x88CE,0x0000,0x88F5,0x891C,0xFA60,0x8918, +0x8919,0x891A,0x8927,0x8930,0x8932,0x8939,0x8940,0x8994, +0xFA61,0x89D4,0x89E5,0x89F6,0x8A12,0x8A15, +/* plane 1 ku 92 */ +0x8A22,0x8A37,0x8A47,0x8A4E,0x8A5D,0x8A61,0x8A75,0x8A79, +0x8AA7,0x8AD0,0x8ADF,0x8AF4,0x8AF6,0xFA22,0xFA62,0xFA63, +0x8B46,0x8B54,0x8B59,0x8B69,0x8B9D,0x8C49,0x8C68,0xFA64, +0x8CE1,0x8CF4,0x8CF8,0x8CFE,0xFA65,0x8D12,0x8D1B,0x8DAF, +0x8DCE,0x8DD1,0x8DD7,0x8E20,0x8E23,0x8E3D,0x8E70,0x8E7B, +0x0000,0x8EC0,0x4844,0x8EFA,0x8F1E,0x8F2D,0x8F36,0x8F54, +0x0000,0x8FA6,0x8FB5,0x8FE4,0x8FE8,0x8FEE,0x9008,0x902D, +0xFA67,0x9088,0x9095,0x9097,0x9099,0x909B,0x90A2,0x90B3, +0x90BE,0x90C4,0x90C5,0x90C7,0x90D7,0x90DD,0x90DE,0x90EF, +0x90F4,0xFA26,0x9114,0x9115,0x9116,0x9122,0x9123,0x9127, +0x912F,0x9131,0x9134,0x913D,0x9148,0x915B,0x9183,0x919E, +0x91AC,0x91B1,0x91BC,0x91D7,0x91FB,0x91E4, +/* plane 1 ku 93 */ +0x91E5,0x91ED,0x91F1,0x9207,0x9210,0x9238,0x9239,0x923A, +0x923C,0x9240,0x9243,0x924F,0x9278,0x9288,0x92C2,0x92CB, +0x92CC,0x92D3,0x92E0,0x92FF,0x9304,0x931F,0x9321,0x9325, +0x9348,0x9349,0x934A,0x9364,0x9365,0x936A,0x9370,0x939B, +0x93A3,0x93BA,0x93C6,0x93DE,0x93DF,0x9404,0x93FD,0x9433, +0x944A,0x9463,0x946B,0x9471,0x9472,0x958E,0x959F,0x95A6, +0x95A9,0x95AC,0x95B6,0x95BD,0x95CB,0x95D0,0x95D3,0x49B0, +0x95DA,0x95DE,0x9658,0x9684,0xF9DC,0x969D,0x96A4,0x96A5, +0x96D2,0x96DE,0xFA68,0x96E9,0x96EF,0x9733,0x973B,0x974D, +0x974E,0x974F,0x975A,0x976E,0x9773,0x9795,0x97AE,0x97BA, +0x97C1,0x97C9,0x97DE,0x97DB,0x97F4,0xFA69,0x980A,0x981E, +0x982B,0x9830,0xFA6A,0x9852,0x9853,0x9856, +/* plane 1 ku 94 */ +0x9857,0x9859,0x985A,0xF9D0,0x9865,0x986C,0x98BA,0x98C8, +0x98E7,0x9958,0x999E,0x9A02,0x9A03,0x9A24,0x9A2D,0x9A2E, +0x9A38,0x9A4A,0x9A4E,0x9A52,0x9AB6,0x9AC1,0x9AC3,0x9ACE, +0x9AD6,0x9AF9,0x9B02,0x9B08,0x9B20,0x4C17,0x9B2D,0x9B5E, +0x9B79,0x9B66,0x9B72,0x9B75,0x9B84,0x9B8A,0x9B8F,0x9B9E, +0x9BA7,0x9BC1,0x9BCE,0x9BE5,0x9BF8,0x9BFD,0x9C00,0x9C23, +0x9C41,0x9C4F,0x9C50,0x9C53,0x9C63,0x9C65,0x9C77,0x9D1D, +0x9D1E,0x9D43,0x9D47,0x9D52,0x9D63,0x9D70,0x9D7C,0x9D8A, +0x9D96,0x9DC0,0x9DAC,0x9DBC,0x9DD7,0x0000,0x9DE7,0x9E07, +0x9E15,0x9E7C,0x9E9E,0x9EA4,0x9EAC,0x9EAF,0x9EB4,0x9EB5, +0x9EC3,0x9ED1,0x9F10,0x9F39,0x9F57,0x9F90,0x9F94,0x9F97, +0x9FA2,0x59F8,0x5C5B,0x5E77,0x7626,0x7E6B, +/* plane 2 ku 1 */ +0x0000,0x4E02,0x4E0F,0x4E12,0x4E29,0x4E2B,0x4E2E,0x4E40, +0x4E47,0x4E48,0x0000,0x4E51,0x3406,0x0000,0x4E5A,0x4E69, +0x4E9D,0x342C,0x342E,0x4EB9,0x4EBB,0x0000,0x4EBC,0x4EC3, +0x4EC8,0x4ED0,0x4EEB,0x4EDA,0x4EF1,0x4EF5,0x4F00,0x4F16, +0x4F64,0x4F37,0x4F3E,0x4F54,0x4F58,0x0000,0x4F77,0x4F78, +0x4F7A,0x4F7D,0x4F82,0x4F85,0x4F92,0x4F9A,0x4FE6,0x4FB2, +0x4FBE,0x4FC5,0x4FCB,0x4FCF,0x4FD2,0x346A,0x4FF2,0x5000, +0x5010,0x5013,0x501C,0x501E,0x5022,0x3468,0x5042,0x5046, +0x504E,0x5053,0x5057,0x5063,0x5066,0x506A,0x5070,0x50A3, +0x5088,0x5092,0x5093,0x5095,0x5096,0x509C,0x50AA,0x0000, +0x50B1,0x50BA,0x50BB,0x50C4,0x50C7,0x50F3,0x0000,0x50CE, +0x0000,0x50D4,0x50D9,0x50E1,0x50E9,0x3492, +/* plane 2 ku 8 */ +0x5B96,0x5BAC,0x3761,0x5BC0,0x3762,0x5BCE,0x5BD6,0x376C, +0x376B,0x5BF1,0x5BFD,0x3775,0x5C03,0x5C29,0x5C30,0x0000, +0x5C5F,0x5C63,0x5C67,0x5C68,0x5C69,0x5C70,0x0000,0x0000, +0x5C7C,0x0000,0x0000,0x5C88,0x5C8A,0x37C1,0x0000,0x0000, +0x5CA0,0x5CA2,0x5CA6,0x5CA7,0x0000,0x5CAD,0x5CB5,0x0000, +0x5CC9,0x0000,0x0000,0x5D06,0x5D10,0x5D2B,0x5D1D,0x5D20, +0x5D24,0x5D26,0x5D31,0x5D39,0x5D42,0x37E8,0x5D61,0x5D6A, +0x37F4,0x5D70,0x0000,0x37FD,0x5D88,0x3800,0x5D92,0x5D94, +0x5D97,0x5D99,0x5DB0,0x5DB2,0x5DB4,0x0000,0x5DB9,0x5DD1, +0x5DD7,0x5DD8,0x5DE0,0x0000,0x5DE4,0x5DE9,0x382F,0x5E00, +0x3836,0x5E12,0x5E15,0x3840,0x5E1F,0x5E2E,0x5E3E,0x5E49, +0x385C,0x5E56,0x3861,0x5E6B,0x5E6C,0x5E6D, +/* plane 2 ku 3 */ +0x5108,0x0000,0x5117,0x511B,0x0000,0x5160,0x0000,0x5173, +0x5183,0x518B,0x34BC,0x5198,0x51A3,0x51AD,0x34C7,0x51BC, +0x0000,0x0000,0x51F3,0x51F4,0x5202,0x5212,0x5216,0x0000, +0x5255,0x525C,0x526C,0x5277,0x5284,0x5282,0x0000,0x5298, +0x0000,0x52A4,0x52A6,0x52AF,0x52BA,0x52BB,0x52CA,0x351F, +0x52D1,0x0000,0x52F7,0x530A,0x530B,0x5324,0x5335,0x533E, +0x5342,0x0000,0x0000,0x5367,0x536C,0x537A,0x53A4,0x53B4, +0x0000,0x53B7,0x53C0,0x0000,0x355D,0x355E,0x53D5,0x53DA, +0x3563,0x53F4,0x53F5,0x5455,0x5424,0x5428,0x356E,0x5443, +0x5462,0x5466,0x546C,0x548A,0x548D,0x5495,0x54A0,0x54A6, +0x54AD,0x54AE,0x54B7,0x54BA,0x54BF,0x54C3,0x0000,0x54EC, +0x54EF,0x54F1,0x54F3,0x5500,0x5501,0x5509, +/* plane 2 ku 4 */ +0x553C,0x5541,0x35A6,0x5547,0x554A,0x35A8,0x5560,0x5561, +0x5564,0x0000,0x557D,0x5582,0x5588,0x5591,0x35C5,0x55D2, +0x0000,0x0000,0x55BF,0x55C9,0x55CC,0x55D1,0x55DD,0x35DA, +0x55E2,0x0000,0x55E9,0x5628,0x0000,0x5607,0x5610,0x5630, +0x5637,0x35F4,0x563D,0x563F,0x5640,0x5647,0x565E,0x5660, +0x566D,0x3605,0x5688,0x568C,0x5695,0x569A,0x569D,0x56A8, +0x56AD,0x56B2,0x56C5,0x56CD,0x56DF,0x56E8,0x56F6,0x56F7, +0x0000,0x5715,0x5723,0x0000,0x5729,0x0000,0x5745,0x5746, +0x574C,0x574D,0x0000,0x5768,0x576F,0x5773,0x5774,0x5775, +0x577B,0x0000,0x0000,0x57AC,0x579A,0x579D,0x579E,0x57A8, +0x57D7,0x0000,0x57CC,0x0000,0x0000,0x57DE,0x57E6,0x57F0, +0x364A,0x57F8,0x57FB,0x57FD,0x5804,0x581E, +/* plane 2 ku 5 */ +0x5820,0x5827,0x5832,0x5839,0x0000,0x5849,0x584C,0x5867, +0x588A,0x588B,0x588D,0x588F,0x5890,0x5894,0x589D,0x58AA, +0x58B1,0x0000,0x58C3,0x58CD,0x58E2,0x58F3,0x58F4,0x5905, +0x5906,0x590B,0x590D,0x5914,0x5924,0x0000,0x3691,0x593D, +0x3699,0x5946,0x3696,0x0000,0x595B,0x595F,0x0000,0x5975, +0x5976,0x597C,0x599F,0x59AE,0x59BC,0x59C8,0x59CD,0x59DE, +0x59E3,0x59E4,0x59E7,0x59EE,0x0000,0x0000,0x36CF,0x5A0C, +0x5A0D,0x5A17,0x5A27,0x5A2D,0x5A55,0x5A65,0x5A7A,0x5A8B, +0x5A9C,0x5A9F,0x5AA0,0x5AA2,0x5AB1,0x5AB3,0x5AB5,0x5ABA, +0x5ABF,0x5ADA,0x5ADC,0x5AE0,0x5AE5,0x5AF0,0x5AEE,0x5AF5, +0x5B00,0x5B08,0x5B17,0x5B34,0x5B2D,0x5B4C,0x5B52,0x5B68, +0x5B6F,0x5B7C,0x5B7F,0x5B81,0x5B84,0x0000, +/* plane 2 ku 12 */ +0x5E6E,0x0000,0x5EA5,0x5EAA,0x5EAC,0x5EB9,0x5EBF,0x5EC6, +0x5ED2,0x5ED9,0x0000,0x5EFD,0x5F08,0x5F0E,0x5F1C,0x0000, +0x5F1E,0x5F47,0x5F63,0x5F72,0x5F7E,0x5F8F,0x5FA2,0x5FA4, +0x5FB8,0x5FC4,0x38FA,0x5FC7,0x5FCB,0x5FD2,0x5FD3,0x5FD4, +0x5FE2,0x5FEE,0x5FEF,0x5FF3,0x5FFC,0x3917,0x6017,0x6022, +0x6024,0x391A,0x604C,0x607F,0x608A,0x6095,0x60A8,0x0000, +0x60B0,0x60B1,0x60BE,0x60C8,0x60D9,0x60DB,0x60EE,0x60F2, +0x60F5,0x6110,0x6112,0x6113,0x6119,0x611E,0x613A,0x396F, +0x6141,0x6146,0x6160,0x617C,0x0000,0x6192,0x6193,0x6197, +0x6198,0x61A5,0x61A8,0x61AD,0x0000,0x61D5,0x61DD,0x61DF, +0x61F5,0x0000,0x6215,0x6223,0x6229,0x6246,0x624C,0x6251, +0x6252,0x6261,0x6264,0x627B,0x626D,0x6273, +/* plane 2 ku 13 */ +0x6299,0x62A6,0x62D5,0x0000,0x62FD,0x6303,0x630D,0x6310, +0x0000,0x0000,0x6332,0x6335,0x633B,0x633C,0x6341,0x6344, +0x634E,0x0000,0x6359,0x0000,0x0000,0x636C,0x6384,0x6399, +0x0000,0x6394,0x63BD,0x63F7,0x63D4,0x63D5,0x63DC,0x63E0, +0x63EB,0x63EC,0x63F2,0x6409,0x641E,0x6425,0x6429,0x642F, +0x645A,0x645B,0x645D,0x6473,0x647D,0x6487,0x6491,0x649D, +0x649F,0x64CB,0x64CC,0x64D5,0x64D7,0x0000,0x64E4,0x64E5, +0x64FF,0x6504,0x3A6E,0x650F,0x6514,0x6516,0x3A73,0x651E, +0x6532,0x6544,0x6554,0x656B,0x657A,0x6581,0x6584,0x6585, +0x658A,0x65B2,0x65B5,0x65B8,0x65BF,0x65C2,0x65C9,0x65D4, +0x3AD6,0x65F2,0x65F9,0x65FC,0x6604,0x6608,0x6621,0x662A, +0x6645,0x6651,0x664E,0x3AEA,0x0000,0x6657, +/* plane 2 ku 14 */ +0x665B,0x6663,0x0000,0x0000,0x666A,0x666B,0x666C,0x666D, +0x667B,0x6680,0x6690,0x6692,0x6699,0x3B0E,0x66AD,0x66B1, +0x66B5,0x3B1A,0x66BF,0x3B1C,0x66EC,0x3AD7,0x6701,0x6705, +0x6712,0x0000,0x6719,0x0000,0x0000,0x674C,0x674D,0x6754, +0x675D,0x0000,0x0000,0x0000,0x6774,0x6776,0x0000,0x6792, +0x0000,0x8363,0x6810,0x67B0,0x67B2,0x67C3,0x67C8,0x67D2, +0x67D9,0x67DB,0x67F0,0x67F7,0x0000,0x0000,0x0000,0x6818, +0x681F,0x682D,0x0000,0x6833,0x683B,0x683E,0x6844,0x6845, +0x6849,0x684C,0x6855,0x6857,0x3B77,0x686B,0x686E,0x687A, +0x687C,0x6882,0x6890,0x6896,0x3B6D,0x6898,0x6899,0x689A, +0x689C,0x68AA,0x68AB,0x68B4,0x68BB,0x68FB,0x0000,0x0000, +0xFA13,0x68C3,0x68C5,0x68CC,0x68CF,0x68D6, +/* plane 2 ku 15 */ +0x68D9,0x68E4,0x68E5,0x68EC,0x68F7,0x6903,0x6907,0x3B87, +0x3B88,0x0000,0x693B,0x3B8D,0x6946,0x6969,0x696C,0x6972, +0x697A,0x697F,0x6992,0x3BA4,0x6996,0x6998,0x69A6,0x69B0, +0x69B7,0x69BA,0x69BC,0x69C0,0x69D1,0x69D6,0x0000,0x0000, +0x6A30,0x0000,0x0000,0x69E3,0x69EE,0x69EF,0x69F3,0x3BCD, +0x69F4,0x69FE,0x6A11,0x6A1A,0x6A1D,0x0000,0x6A32,0x6A33, +0x6A34,0x6A3F,0x6A46,0x6A49,0x6A7A,0x6A4E,0x6A52,0x6A64, +0x0000,0x6A7E,0x6A83,0x6A8B,0x3BF0,0x6A91,0x6A9F,0x6AA1, +0x0000,0x6AAB,0x6ABD,0x6AC6,0x6AD4,0x6AD0,0x6ADC,0x6ADD, +0x0000,0x0000,0x6AEC,0x6AF1,0x6AF2,0x6AF3,0x6AFD,0x0000, +0x6B0B,0x6B0F,0x6B10,0x6B11,0x0000,0x6B17,0x3C26,0x6B2F, +0x6B4A,0x6B58,0x6B6C,0x6B75,0x6B7A,0x6B81, +/* plane 2 ku 78 */ +0x6B9B,0x6BAE,0x0000,0x6BBD,0x6BBE,0x6BC7,0x6BC8,0x6BC9, +0x6BDA,0x6BE6,0x6BE7,0x6BEE,0x6BF1,0x6C02,0x6C0A,0x6C0E, +0x6C35,0x6C36,0x6C3A,0x0000,0x6C3F,0x6C4D,0x6C5B,0x6C6D, +0x6C84,0x6C89,0x3CC3,0x6C94,0x6C95,0x6C97,0x6CAD,0x6CC2, +0x6CD0,0x3CD2,0x6CD6,0x6CDA,0x6CDC,0x6CE9,0x6CEC,0x6CED, +0x0000,0x6D00,0x6D0A,0x6D24,0x6D26,0x6D27,0x6C67,0x6D2F, +0x6D3C,0x6D5B,0x6D5E,0x6D60,0x6D70,0x6D80,0x6D81,0x6D8A, +0x6D8D,0x6D91,0x6D98,0x0000,0x6E17,0x0000,0x0000,0x0000, +0x6DAB,0x6DAE,0x6DB4,0x6DC2,0x6D34,0x6DC8,0x6DCE,0x6DCF, +0x6DD0,0x6DDF,0x6DE9,0x6DF6,0x6E36,0x6E1E,0x6E22,0x6E27, +0x3D11,0x6E32,0x6E3C,0x6E48,0x6E49,0x6E4B,0x6E4C,0x6E4F, +0x6E51,0x6E53,0x6E54,0x6E57,0x6E63,0x3D1E, +/* plane 2 ku 79 */ +0x6E93,0x6EA7,0x6EB4,0x6EBF,0x6EC3,0x6ECA,0x6ED9,0x6F35, +0x6EEB,0x6EF9,0x6EFB,0x6F0A,0x6F0C,0x6F18,0x6F25,0x6F36, +0x6F3C,0x0000,0x6F52,0x6F57,0x6F5A,0x6F60,0x6F68,0x6F98, +0x6F7D,0x6F90,0x6F96,0x6FBE,0x6F9F,0x6FA5,0x6FAF,0x3D64, +0x6FB5,0x6FC8,0x6FC9,0x6FDA,0x6FDE,0x6FE9,0x0000,0x6FFC, +0x7000,0x7007,0x700A,0x7023,0x0000,0x7039,0x703A,0x703C, +0x7043,0x7047,0x704B,0x3D9A,0x7054,0x7065,0x7069,0x706C, +0x706E,0x7076,0x707E,0x7081,0x7086,0x7095,0x7097,0x70BB, +0x0000,0x709F,0x70B1,0x0000,0x70EC,0x70CA,0x70D1,0x70D3, +0x70DC,0x7103,0x7104,0x7106,0x7107,0x7108,0x710C,0x3DC0, +0x712F,0x7131,0x7150,0x714A,0x7153,0x715E,0x3DD4,0x7196, +0x7180,0x719B,0x71A0,0x71A2,0x71AE,0x71AF, +/* plane 2 ku 80 */ +0x71B3,0x0000,0x71CB,0x71D3,0x71D9,0x71DC,0x7207,0x3E05, +0xFA49,0x722B,0x7234,0x7238,0x7239,0x4E2C,0x7242,0x7253, +0x7257,0x7263,0x0000,0x726E,0x726F,0x7278,0x727F,0x728E, +0x0000,0x72AD,0x72AE,0x72B0,0x72B1,0x72C1,0x3E60,0x72CC, +0x3E66,0x3E68,0x72F3,0x72FA,0x7307,0x7312,0x7318,0x7319, +0x3E83,0x7339,0x732C,0x7331,0x7333,0x733D,0x7352,0x3E94, +0x736B,0x736C,0x0000,0x736E,0x736F,0x7371,0x7377,0x7381, +0x7385,0x738A,0x7394,0x7398,0x739C,0x739E,0x73A5,0x73A8, +0x73B5,0x73B7,0x73B9,0x73BC,0x73BF,0x73C5,0x73CB,0x73E1, +0x73E7,0x73F9,0x7413,0x73FA,0x7401,0x7424,0x7431,0x7439, +0x7453,0x7440,0x7443,0x744D,0x7452,0x745D,0x7471,0x7481, +0x7485,0x7488,0x0000,0x7492,0x7497,0x7499, +/* plane 2 ku 81 */ +0x74A0,0x74A1,0x74A5,0x74AA,0x74AB,0x74B9,0x74BB,0x74BA, +0x74D6,0x74D8,0x74DE,0x74EF,0x74EB,0x0000,0x74FA,0x0000, +0x7520,0x7524,0x752A,0x3F57,0x0000,0x753D,0x753E,0x7540, +0x7548,0x754E,0x7550,0x7552,0x756C,0x7572,0x7571,0x757A, +0x757D,0x757E,0x7581,0x0000,0x758C,0x3F75,0x75A2,0x3F77, +0x75B0,0x75B7,0x75BF,0x75C0,0x75C6,0x75CF,0x75D3,0x75DD, +0x75DF,0x75E0,0x75E7,0x75EC,0x75EE,0x75F1,0x75F9,0x7603, +0x7618,0x7607,0x760F,0x3FAE,0x0000,0x7613,0x761B,0x761C, +0x0000,0x7625,0x7628,0x763C,0x7633,0x0000,0x3FC9,0x7641, +0x0000,0x7649,0x7655,0x3FD7,0x766E,0x7695,0x769C,0x76A1, +0x76A0,0x76A7,0x76A8,0x76AF,0x0000,0x76C9,0x0000,0x76E8, +0x76EC,0x0000,0x7717,0x771A,0x772D,0x7735, +/* plane 2 ku 82 */ +0x0000,0x4039,0x0000,0x0000,0x7758,0x7760,0x776A,0x0000, +0x7772,0x777C,0x777D,0x0000,0x4058,0x779A,0x779F,0x77A2, +0x77A4,0x77A9,0x77DE,0x77DF,0x77E4,0x77E6,0x77EA,0x77EC, +0x4093,0x77F0,0x77F4,0x77FB,0x0000,0x7805,0x7806,0x7809, +0x780D,0x7819,0x7821,0x782C,0x7847,0x7864,0x786A,0x0000, +0x788A,0x7894,0x78A4,0x789D,0x789E,0x789F,0x78BB,0x78C8, +0x78CC,0x78CE,0x78D5,0x78E0,0x78E1,0x78E6,0x78F9,0x78FA, +0x78FB,0x78FE,0x0000,0x7910,0x791B,0x7930,0x7925,0x793B, +0x794A,0x7958,0x795B,0x4105,0x7967,0x7972,0x7994,0x7995, +0x7996,0x799B,0x79A1,0x79A9,0x79B4,0x79BB,0x79C2,0x79C7, +0x79CC,0x79CD,0x79D6,0x4148,0x0000,0x0000,0x414F,0x7A0A, +0x7A11,0x7A15,0x7A1B,0x7A1E,0x4163,0x7A2D, +/* plane 2 ku 83 */ +0x7A38,0x7A47,0x7A4C,0x7A56,0x7A59,0x7A5C,0x7A5F,0x7A60, +0x7A67,0x7A6A,0x7A75,0x7A78,0x7A82,0x7A8A,0x7A90,0x7AA3, +0x7AAC,0x0000,0x41B4,0x7AB9,0x7ABC,0x7ABE,0x41BF,0x7ACC, +0x7AD1,0x7AE7,0x7AE8,0x7AF4,0x0000,0x0000,0x7B07,0x0000, +0x7B3D,0x7B27,0x7B2A,0x7B2E,0x7B2F,0x7B31,0x41E6,0x41F3, +0x7B7F,0x7B41,0x41EE,0x7B55,0x7B79,0x7B64,0x7B66,0x7B69, +0x7B73,0x0000,0x4207,0x7B90,0x7B91,0x7B9B,0x420E,0x7BAF, +0x7BB5,0x7BBC,0x7BC5,0x7BCA,0x0000,0x0000,0x7BD4,0x7BD6, +0x7BDA,0x7BEA,0x7BF0,0x7C03,0x7C0B,0x7C0E,0x7C0F,0x7C26, +0x7C45,0x7C4A,0x7C51,0x7C57,0x7C5E,0x7C61,0x7C69,0x7C6E, +0x7C6F,0x7C70,0x0000,0x0000,0x0000,0x7CA6,0x0000,0x7CB6, +0x7CB7,0x7CBF,0x0000,0x7CC4,0x0000,0x7CC8, +/* plane 2 ku 84 */ +0x7CCD,0x0000,0x7CD7,0x0000,0x7CE6,0x7CEB,0x0000,0x7CF5, +0x7D03,0x7D09,0x42C6,0x7D12,0x7D1E,0x0000,0x0000,0x7D3D, +0x7D3E,0x7D40,0x7D47,0x0000,0x0000,0x42D6,0x7D59,0x7D5A, +0x7D6A,0x7D70,0x42DD,0x7D7F,0x0000,0x7D86,0x7D88,0x7D8C, +0x7D97,0x0000,0x7D9D,0x7DA7,0x7DAA,0x7DB6,0x7DB7,0x7DC0, +0x7DD7,0x7DD9,0x7DE6,0x7DF1,0x7DF9,0x4302,0x0000,0xFA58, +0x7E10,0x7E17,0x7E1D,0x7E20,0x7E27,0x7E2C,0x7E45,0x7E73, +0x7E75,0x7E7E,0x7E86,0x7E87,0x432B,0x7E91,0x7E98,0x7E9A, +0x4343,0x7F3C,0x7F3B,0x7F3E,0x7F43,0x7F44,0x7F4F,0x34C1, +0x0000,0x7F52,0x0000,0x7F61,0x7F63,0x7F64,0x7F6D,0x7F7D, +0x7F7E,0x0000,0x7F90,0x517B,0x0000,0x7F96,0x7F9C,0x7FAD, +0x0000,0x7FC3,0x7FCF,0x7FE3,0x7FE5,0x7FEF, +/* plane 2 ku 85 */ +0x7FF2,0x8002,0x800A,0x8008,0x800E,0x8011,0x8016,0x8024, +0x802C,0x8030,0x8043,0x8066,0x8071,0x8075,0x807B,0x8099, +0x809C,0x80A4,0x80A7,0x80B8,0x0000,0x80C5,0x80D5,0x80D8, +0x80E6,0x0000,0x810D,0x80F5,0x80FB,0x43EE,0x8135,0x8116, +0x811E,0x43F0,0x8124,0x8127,0x812C,0x0000,0x813D,0x4408, +0x8169,0x4417,0x8181,0x441C,0x8184,0x8185,0x4422,0x8198, +0x81B2,0x81C1,0x81C3,0x81D6,0x81DB,0x0000,0x81E4,0x0000, +0x81EC,0x0000,0x81FD,0x81FF,0x0000,0x8204,0x0000,0x8219, +0x8221,0x8222,0x0000,0x8232,0x8234,0x823C,0x8246,0x8249, +0x8245,0x0000,0x824B,0x4476,0x824F,0x447A,0x8257,0x0000, +0x825C,0x8263,0x0000,0xFA5D,0xFA5E,0x8279,0x4491,0x827D, +0x827F,0x8283,0x828A,0x8293,0x82A7,0x82A8, +/* plane 2 ku 86 */ +0x82B2,0x82B4,0x82BA,0x82BC,0x82E2,0x82E8,0x82F7,0x8307, +0x8308,0x830C,0x8354,0x831B,0x831D,0x8330,0x833C,0x8344, +0x8357,0x44BE,0x837F,0x44D4,0x44B3,0x838D,0x8394,0x8395, +0x839B,0x839D,0x83C9,0x83D0,0x83D4,0x83DD,0x83E5,0x83F9, +0x840F,0x8411,0x8415,0x0000,0x8417,0x8439,0x844A,0x844F, +0x8451,0x8452,0x8459,0x845A,0x845C,0x0000,0x8465,0x8476, +0x8478,0x847C,0x8481,0x450D,0x84DC,0x8497,0x84A6,0x84BE, +0x4508,0x84CE,0x84CF,0x84D3,0x0000,0x84E7,0x84EA,0x84EF, +0x84F0,0x84F1,0x84FA,0x84FD,0x850C,0x851B,0x8524,0x8525, +0x852B,0x8534,0x854F,0x856F,0x4525,0x4543,0x853E,0x8551, +0x8553,0x855E,0x8561,0x8562,0x0000,0x857B,0x857D,0x857F, +0x8581,0x8586,0x8593,0x859D,0x859F,0x0000, +/* plane 2 ku 87 */ +0x0000,0x0000,0x85B7,0x85BC,0x85C7,0x85CA,0x85D8,0x85D9, +0x85DF,0x85E1,0x85E6,0x85F6,0x8600,0x8611,0x861E,0x8621, +0x8624,0x8627,0x0000,0x8639,0x863C,0x0000,0x8640,0xFA20, +0x8653,0x8656,0x866F,0x8677,0x867A,0x8687,0x8689,0x868D, +0x8691,0x869C,0x869D,0x86A8,0xFA21,0x86B1,0x86B3,0x86C1, +0x86C3,0x86D1,0x86D5,0x86D7,0x86E3,0x86E6,0x45B8,0x8705, +0x8707,0x870E,0x8710,0x8713,0x8719,0x871F,0x8721,0x8723, +0x8731,0x873A,0x873E,0x8740,0x8743,0x8751,0x8758,0x8764, +0x8765,0x8772,0x877C,0x0000,0x0000,0x87A7,0x8789,0x878B, +0x8793,0x87A0,0x0000,0x45E5,0x87BE,0x0000,0x87C1,0x87CE, +0x87F5,0x87DF,0x0000,0x87E3,0x87E5,0x87E6,0x87EA,0x87EB, +0x87ED,0x8801,0x8803,0x880B,0x8813,0x8828, +/* plane 2 ku 88 */ +0x882E,0x8832,0x883C,0x460F,0x884A,0x8858,0x885F,0x8864, +0x0000,0x0000,0x8869,0x0000,0x886F,0x88A0,0x88BC,0x88BD, +0x88BE,0x88C0,0x88D2,0x0000,0x88D1,0x88D3,0x88DB,0x88F0, +0x88F1,0x4641,0x8901,0x0000,0x8937,0x0000,0x8942,0x8945, +0x8949,0x0000,0x4665,0x8962,0x8980,0x8989,0x8990,0x899F, +0x89B0,0x89B7,0x89D6,0x89D8,0x89EB,0x46A1,0x89F1,0x89F3, +0x89FD,0x89FF,0x46AF,0x8A11,0x8A14,0x0000,0x8A21,0x8A35, +0x8A3E,0x8A45,0x8A4D,0x8A58,0x8AAE,0x8A90,0x8AB7,0x8ABE, +0x8AD7,0x8AFC,0x0000,0x8B0A,0x8B05,0x8B0D,0x8B1C,0x8B1F, +0x8B2D,0x8B43,0x470C,0x8B51,0x8B5E,0x8B76,0x8B7F,0x8B81, +0x8B8B,0x8B94,0x8B95,0x8B9C,0x8B9E,0x8C39,0x0000,0x8C3D, +0x0000,0x0000,0x8C45,0x8C47,0x8C4F,0x8C54, +/* plane 2 ku 89 */ +0x8C57,0x8C69,0x8C6D,0x8C73,0x0000,0x8C93,0x8C92,0x8C99, +0x4764,0x8C9B,0x8CA4,0x8CD6,0x8CD5,0x8CD9,0x0000,0x8CF0, +0x8CF1,0x0000,0x8D09,0x8D0E,0x8D6C,0x8D84,0x8D95,0x8DA6, +0x0000,0x8DC6,0x8DC8,0x8DD9,0x8DEC,0x8E0C,0x47FD,0x8DFD, +0x8E06,0x0000,0x8E14,0x8E16,0x8E21,0x8E22,0x8E27,0x0000, +0x4816,0x8E36,0x8E39,0x8E4B,0x8E54,0x8E62,0x8E6C,0x8E6D, +0x8E6F,0x8E98,0x8E9E,0x8EAE,0x8EB3,0x8EB5,0x8EB6,0x8EBB, +0x0000,0x8ED1,0x8ED4,0x484E,0x8EF9,0x0000,0x8F00,0x8F08, +0x8F17,0x8F2B,0x8F40,0x8F4A,0x8F58,0x0000,0x8FA4,0x8FB4, +0xFA66,0x8FB6,0x0000,0x8FC1,0x8FC6,0xFA24,0x8FCA,0x8FCD, +0x8FD3,0x8FD5,0x8FE0,0x8FF1,0x8FF5,0x8FFB,0x9002,0x900C, +0x9037,0x0000,0x9043,0x9044,0x905D,0x0000, +/* plane 2 ku 90 */ +0x0000,0x9085,0x908C,0x9090,0x961D,0x90A1,0x48B5,0x90B0, +0x90B6,0x90C3,0x90C8,0x0000,0x90DC,0x90DF,0x0000,0x90F6, +0x90F2,0x9100,0x90EB,0x90FE,0x90FF,0x9104,0x9106,0x9118, +0x911C,0x911E,0x9137,0x9139,0x913A,0x9146,0x9147,0x9157, +0x9159,0x9161,0x9164,0x9174,0x9179,0x9185,0x918E,0x91A8, +0x91AE,0x91B3,0x91B6,0x91C3,0x91C4,0x91DA,0x0000,0x0000, +0x91EC,0x91EE,0x9201,0x920A,0x9216,0x9217,0x0000,0x9233, +0x9242,0x9247,0x924A,0x924E,0x9251,0x9256,0x9259,0x9260, +0x9261,0x9265,0x9267,0x9268,0x0000,0x0000,0x927C,0x927D, +0x927F,0x9289,0x928D,0x9297,0x9299,0x929F,0x92A7,0x92AB, +0x0000,0x0000,0x92B2,0x92BF,0x92C0,0x92C6,0x92CE,0x92D0, +0x92D7,0x92D9,0x92E5,0x92E7,0x9311,0x0000, +/* plane 2 ku 91 */ +0x0000,0x92F7,0x92F9,0x92FB,0x9302,0x930D,0x9315,0x931D, +0x931E,0x9327,0x9329,0x0000,0x0000,0x9347,0x9351,0x9357, +0x935A,0x936B,0x9371,0x9373,0x93A1,0x0000,0x0000,0x9388, +0x938B,0x938F,0x939E,0x93F5,0x0000,0x0000,0x93F1,0x93C1, +0x93C7,0x93DC,0x93E2,0x93E7,0x9409,0x940F,0x9416,0x9417, +0x93FB,0x9432,0x9434,0x943B,0x9445,0x0000,0x0000,0x946D, +0x946F,0x9578,0x9579,0x9586,0x958C,0x958D,0x0000,0x95AB, +0x95B4,0x0000,0x95C8,0x0000,0x0000,0x962C,0x9633,0x9634, +0x0000,0x963C,0x9641,0x9661,0x0000,0x9682,0x0000,0x969A, +0x0000,0x49E7,0x96A9,0x96AF,0x96B3,0x96BA,0x96BD,0x49FA, +0x0000,0x96D8,0x96DA,0x96DD,0x4A04,0x9714,0x9723,0x4A29, +0x9736,0x9741,0x9747,0x9755,0x9757,0x975B, +/* plane 2 ku 92 */ +0x976A,0x0000,0x0000,0x9796,0x979A,0x979E,0x97A2,0x97B1, +0x97B2,0x97BE,0x97CC,0x97D1,0x97D4,0x97D8,0x97D9,0x97E1, +0x97F1,0x9804,0x980D,0x980E,0x9814,0x9816,0x4ABC,0x0000, +0x9823,0x9832,0x9833,0x9825,0x9847,0x9866,0x98AB,0x98AD, +0x98B0,0x0000,0x98B7,0x98B8,0x98BB,0x98BC,0x98BF,0x98C2, +0x98C7,0x98CB,0x98E0,0x0000,0x98E1,0x98E3,0x98E5,0x98EA, +0x98F0,0x98F1,0x98F3,0x9908,0x4B3B,0x0000,0x9916,0x9917, +0x0000,0x991A,0x991B,0x991C,0x0000,0x9931,0x9932,0x9933, +0x993A,0x993B,0x993C,0x9940,0x9941,0x9946,0x994D,0x994E, +0x995C,0x995F,0x9960,0x99A3,0x99A6,0x99B9,0x99BD,0x99BF, +0x99C3,0x99C9,0x99D4,0x99D9,0x99DE,0x0000,0x99F0,0x99F9, +0x99FC,0x9A0A,0x9A11,0x9A16,0x9A1A,0x9A20, +/* plane 2 ku 93 */ +0x9A31,0x9A36,0x9A44,0x9A4C,0x9A58,0x4BC2,0x9AAF,0x4BCA, +0x9AB7,0x4BD2,0x9AB9,0x0000,0x9AC6,0x9AD0,0x9AD2,0x9AD5, +0x4BE8,0x9ADC,0x9AE0,0x9AE5,0x9AE9,0x9B03,0x9B0C,0x9B10, +0x9B12,0x9B16,0x9B1C,0x9B2B,0x9B33,0x9B3D,0x4C20,0x9B4B, +0x9B63,0x9B65,0x9B6B,0x9B6C,0x9B73,0x9B76,0x9B77,0x9BA6, +0x9BAC,0x9BB1,0x0000,0x0000,0x9BB2,0x9BB8,0x9BBE,0x9BC7, +0x9BF3,0x9BD8,0x9BDD,0x9BE7,0x9BEA,0x9BEB,0x9BEF,0x9BEE, +0x0000,0x9BFA,0x0000,0x9BF7,0x0000,0x9C16,0x9C18,0x9C19, +0x9C1A,0x9C1D,0x9C22,0x9C27,0x9C29,0x9C2A,0x0000,0x9C31, +0x9C36,0x9C37,0x9C45,0x9C5C,0x0000,0x9C49,0x9C4A,0x0000, +0x9C54,0x9C58,0x9C5B,0x9C5D,0x9C5F,0x9C69,0x9C6A,0x9C6B, +0x9C6D,0x9C6E,0x9C70,0x9C72,0x9C75,0x9C7A, +/* plane 2 ku 94 */ +0x9CE6,0x9CF2,0x9D0B,0x9D02,0x0000,0x9D11,0x9D17,0x9D18, +0x0000,0x4CC4,0x0000,0x9D32,0x4CD1,0x9D42,0x9D4A,0x9D5F, +0x9D62,0x0000,0x9D69,0x9D6B,0x0000,0x9D73,0x9D76,0x9D77, +0x9D7E,0x9D84,0x9D8D,0x9D99,0x9DA1,0x9DBF,0x9DB5,0x9DB9, +0x9DBD,0x9DC3,0x9DC7,0x9DC9,0x9DD6,0x9DDA,0x9DDF,0x9DE0, +0x9DE3,0x9DF4,0x4D07,0x9E0A,0x9E02,0x9E0D,0x9E19,0x9E1C, +0x9E1D,0x9E7B,0x0000,0x9E80,0x9E85,0x9E9B,0x9EA8,0x0000, +0x9EBD,0x0000,0x9EDF,0x9EE7,0x9EEE,0x9EFF,0x9F02,0x4D77, +0x9F03,0x9F17,0x9F19,0x9F2F,0x9F37,0x9F3A,0x9F3D,0x9F41, +0x9F45,0x9F46,0x9F53,0x9F55,0x9F58,0x0000,0x9F5D,0x0000, +0x9F69,0x0000,0x9F6D,0x9F70,0x9F75,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,}; + +static const int jisx0213_ucs_table_size = (sizeof(jisx0213_ucs_table)/sizeof(unsigned short)); + + +static const unsigned short ucs_a1_jisx0213_table[] = { // 0x0000 - 0x045f + +/* 0000h */ +0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, +0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, +0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, +0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, +0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, +0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, +0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, +0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, +0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, +0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, +0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, +0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, +0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, +0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, +0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, +0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2922,0x2923,0x2171,0x2172,0x2924,0x005C,0x2925,0x2178, +0x212F,0x2926,0x2927,0x2928,0x224C,0x2929,0x292A,0x292B, +0x216B,0x215E,0x292C,0x292D,0x212D,0x0000,0x2279,0x292E, +0x292F,0x2930,0x2931,0x2932,0x2933,0x2934,0x2935,0x2936, +0x2937,0x2938,0x2939,0x293A,0x293B,0x293C,0x293D,0x293E, +0x293F,0x2940,0x2941,0x2942,0x2943,0x2944,0x2945,0x2946, +0x2947,0x2948,0x2949,0x294A,0x294B,0x294C,0x294D,0x215F, +0x294E,0x294F,0x2950,0x2951,0x2952,0x2953,0x2954,0x2955, +0x2956,0x2957,0x2958,0x2959,0x295A,0x295B,0x295C,0x295D, +0x295E,0x295F,0x2960,0x2961,0x2962,0x2963,0x2964,0x2965, +0x2966,0x2967,0x2968,0x2969,0x296A,0x296B,0x296C,0x2160, +0x296D,0x296E,0x296F,0x2970,0x2971,0x2972,0x2973,0x2974, + +/* 0100h */ +0x2975,0x297A,0x2A3A,0x2A49,0x2A21,0x2A2C,0x2A3C,0x2A4B, +0x2A59,0x2A5F,0x0000,0x0000,0x2A3D,0x2A4C,0x2A40,0x2A4F, +0x0000,0x2A50,0x2978,0x297D,0x0000,0x0000,0x0000,0x0000, +0x2A3E,0x2A4D,0x2A3F,0x2A4E,0x2A5A,0x2A60,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x2A5B,0x2A61,0x0000,0x2A7D, +0x0000,0x0000,0x2976,0x297B,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x2A5C,0x2A62,0x0000,0x0000, +0x0000,0x2A3B,0x2A4A,0x0000,0x0000,0x2A24,0x2A2F,0x0000, +0x0000,0x2A23,0x2A2E,0x2A41,0x2A51,0x0000,0x0000,0x2A42, +0x2A52,0x0000,0x0000,0x2A7A,0x2979,0x297E,0x0000,0x0000, +0x2A43,0x2A53,0x2B2B,0x2B2A,0x2A39,0x2A48,0x0000,0x0000, +0x2A44,0x2A54,0x2A25,0x2A30,0x2A5D,0x2A63,0x2A27,0x2A33, +0x2A26,0x2A32,0x2A47,0x2A57,0x2A28,0x2A34,0x0000,0x0000, +0x0000,0x0000,0x2977,0x297C,0x2A5E,0x2A64,0x2A45,0x2A55, +0x2A46,0x2A56,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x2A29,0x2A35,0x2A2B,0x2A38,0x2A2A,0x2A37,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2B29,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x2B24,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x286F,0x2870,0x0000, +0x2871,0x2876,0x2877,0x0000,0x2878,0x0000,0x2879,0x0000, +0x287A,0x0000,0x287B,0x0000,0x287C,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2874,0x2875,0x0000,0x0000,0x0000,0x2B45,0x0000,0x0000, + +/* 0200h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2B33,0x2B39,0x2B3A,0x2B25,0x2B38,0x2B3F,0x2A6E,0x2B26, +0x2B2E,0x2B30,0x2B43,0x0000,0x2B31,0x0000,0x2B32,0x2A75, +0x2B28,0x2A79,0x0000,0x0000,0x2B36,0x2B3C,0x2B22,0x2B42, +0x2B2C,0x0000,0x0000,0x0000,0x2A6A,0x2A74,0x2A6B,0x2B34, +0x2A7B,0x2A65,0x2A76,0x2A6F,0x0000,0x2B2F,0x0000,0x0000, +0x0000,0x2A6C,0x2B41,0x2A73,0x0000,0x2A70,0x2A67,0x0000, +0x0000,0x2A7C,0x2A71,0x2A68,0x2B27,0x0000,0x0000,0x0000, +0x2A6D,0x2B2D,0x2B35,0x2A66,0x2B37,0x2B3B,0x2A78,0x0000, +0x2A72,0x2B40,0x2A69,0x0000,0x2B21,0x2A7E,0x0000,0x0000, +0x2B23,0x0000,0x0000,0x0000,0x0000,0x2A77,0x0000,0x0000, +0x0000,0x2B3E,0x2B3D,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2A31, +0x2B53,0x0000,0x0000,0x0000,0x2B54,0x0000,0x0000,0x0000, +0x2B55,0x2B56,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2A22,0x2A58,0x0000,0x2A2D,0x0000,0x2A36,0x2B71,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x2B60,0x2B61,0x2B62, +0x2B63,0x2B64,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 0300h */ +0x2B5C,0x2B5A,0x2B5F,0x2B7D,0x2B5B,0x0000,0x2B57,0x0000, +0x2B6D,0x0000,0x0000,0x2B59,0x2B5E,0x0000,0x0000,0x2B5D, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2B78,0x2B79,0x2B7E,0x0000,0x2B6A,0x2B76,0x2B77,0x2B6B, +0x2B6C,0x0000,0x0000,0x0000,0x2B72,0x2B67,0x0000,0x0000, +0x0000,0x2B6F,0x2B7A,0x0000,0x2B68,0x0000,0x0000,0x2B70, +0x2B73,0x0000,0x0000,0x0000,0x2B75,0x0000,0x0000,0x0000, +0x0000,0x2B69,0x2B7B,0x2B7C,0x2B74,0x2B6E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x2B52,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x2621,0x2622,0x2623,0x2624,0x2625,0x2626,0x2627, +0x2628,0x2629,0x262A,0x262B,0x262C,0x262D,0x262E,0x262F, +0x2630,0x2631,0x0000,0x2632,0x2633,0x2634,0x2635,0x2636, +0x2637,0x2638,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x2641,0x2642,0x2643,0x2644,0x2645,0x2646,0x2647, +0x2648,0x2649,0x264A,0x264B,0x264C,0x264D,0x264E,0x264F, +0x2650,0x2651,0x2659,0x2652,0x2653,0x2654,0x2655,0x2656, +0x2657,0x2658,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 0400h */ +0x0000,0x2727,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2721,0x2722,0x2723,0x2724,0x2725,0x2726,0x2728,0x2729, +0x272A,0x272B,0x272C,0x272D,0x272E,0x272F,0x2730,0x2731, +0x2732,0x2733,0x2734,0x2735,0x2736,0x2737,0x2738,0x2739, +0x273A,0x273B,0x273C,0x273D,0x273E,0x273F,0x2740,0x2741, +0x2751,0x2752,0x2753,0x2754,0x2755,0x2756,0x2758,0x2759, +0x275A,0x275B,0x275C,0x275D,0x275E,0x275F,0x2760,0x2761, +0x2762,0x2763,0x2764,0x2765,0x2766,0x2767,0x2768,0x2769, +0x276A,0x276B,0x276C,0x276D,0x276E,0x276F,0x2770,0x2771, +0x0000,0x2757,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +}; + +static const int ucs_a1_jisx0213_table_min = 0x0000; +static const int ucs_a1_jisx0213_table_max = 0x0000 + + (sizeof(ucs_a1_jisx0213_table)/sizeof(unsigned short)); + +static const unsigned short ucs_hk_jisx0213_table[] = { // 0x3000 - 0x30ff +/* 3000h */ +0x2121,0x2122,0x2123,0x2137,0x0000,0x2139,0x213A,0x213B, +0x2152,0x2153,0x2154,0x2155,0x2156,0x2157,0x2158,0x2159, +0x215A,0x215B,0x2229,0x222E,0x214C,0x214D,0x225A,0x225B, +0x2258,0x2259,0x0000,0x0000,0x2141,0x2D60,0x0000,0x2D61, +0x2666,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2233,0x2234,0x2235,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2236,0x2237,0x233C,0x0000,0x0000, +0x0000,0x2421,0x2422,0x2423,0x2424,0x2425,0x2426,0x2427, +0x2428,0x2429,0x242A,0x242B,0x242C,0x242D,0x242E,0x242F, +0x2430,0x2431,0x2432,0x2433,0x2434,0x2435,0x2436,0x2437, +0x2438,0x2439,0x243A,0x243B,0x243C,0x243D,0x243E,0x243F, +0x2440,0x2441,0x2442,0x2443,0x2444,0x2445,0x2446,0x2447, +0x2448,0x2449,0x244A,0x244B,0x244C,0x244D,0x244E,0x244F, +0x2450,0x2451,0x2452,0x2453,0x2454,0x2455,0x2456,0x2457, +0x2458,0x2459,0x245A,0x245B,0x245C,0x245D,0x245E,0x245F, +0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, +0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, +0x2470,0x2471,0x2472,0x2473,0x2474,0x2475,0x2476,0x0000, +0x0000,0x0000,0x0000,0x212B,0x212C,0x2135,0x2136,0x2239, +0x237B,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527, +0x2528,0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F, +0x2530,0x2531,0x2532,0x2533,0x2534,0x2535,0x2536,0x2537, +0x2538,0x2539,0x253A,0x253B,0x253C,0x253D,0x253E,0x253F, +0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,0x2547, +0x2548,0x2549,0x254A,0x254B,0x254C,0x254D,0x254E,0x254F, +0x2550,0x2551,0x2552,0x2553,0x2554,0x2555,0x2556,0x2557, +0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,0x255F, +0x2560,0x2561,0x2562,0x2563,0x2564,0x2565,0x2566,0x2567, +0x2568,0x2569,0x256A,0x256B,0x256C,0x256D,0x256E,0x256F, +0x2570,0x2571,0x2572,0x2573,0x2574,0x2575,0x2576,0x2772, +0x2773,0x2774,0x2775,0x2126,0x213C,0x2133,0x2134,0x2238, +}; + +static const int ucs_hk_jisx0213_min = 0x3000; +static const int ucs_hk_jisx0213_max = 0x30FF; + +static const unsigned short ucs_i_jisx0213_table[] = { // 0x4e00 - 0x9fff + +/* 4E00h */ +0x306C,0x437A,0x7F22,0x3C37,0x0000,0x0000,0x0000,0x4B7C, +0x3E66,0x3B30,0x3E65,0x323C,0x0000,0x4954,0x4D3F,0x7F23, +0x5022,0x312F,0x7F24,0x0000,0x336E,0x5023,0x4024,0x5242, +0x3556,0x4A3A,0x0000,0x0000,0x0000,0x0000,0x3E67,0x0000, +0x0000,0x4E3E,0x0000,0x0000,0x0000,0x0000,0x4A42,0x0000, +0x2E24,0x7F25,0x5024,0x7F26,0x8A2E,0x4366,0x7F27,0x2E25, +0x2E26,0x5025,0x367A,0x0000,0x0000,0x0000,0x5026,0x0000, +0x345D,0x4330,0x0000,0x3C67,0x5027,0x0000,0x0000,0x5028, +0x7F28,0x0000,0x5029,0x4735,0x0000,0x3557,0x0000,0x7F29, +0x7F2A,0x0000,0x0000,0x4737,0x0000,0x4663,0x3843,0x4B33, +0x0000,0x7F2C,0x0000,0x0000,0x0000,0x6949,0x502A,0x3E68, +0x502B,0x3235,0x7F2F,0x0000,0x0000,0x3665,0x3870,0x4C69, +0x0000,0x0000,0x5626,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x7F30,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4D70,0x0000,0x467D,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3425,0x0000, +0x3535,0x0000,0x502C,0x0000,0x0000,0x502D,0x4E3B,0x0000, +0x4D3D,0x4168,0x502F,0x3B76,0x4673,0x2E27,0x5032,0x0000, +0x0000,0x313E,0x385F,0x0000,0x385E,0x3066,0x0000,0x0000, +0x4F4B,0x4F4A,0x0000,0x3A33,0x3021,0x7F31,0x5033,0x5034, +0x5035,0x4B34,0x5036,0x0000,0x3872,0x3067,0x4B72,0x0000, +0x357C,0x0000,0x0000,0x357D,0x357E,0x4462,0x4E3C,0x0000, +0x5037,0x0000,0x0000,0x5038,0x0000,0x0000,0x5039,0x0000, +0x0000,0x7F34,0x3F4D,0x7F35,0x7F37,0x0000,0x0000,0x0000, +0x3D3A,0x3F4E,0x503E,0x7F38,0x503C,0x0000,0x503D,0x3558, +0x7F39,0x0000,0x3A23,0x3270,0x0000,0x503B,0x503A,0x4A29, +0x7F3A,0x0000,0x0000,0x0000,0x3B46,0x3B45,0x423E,0x503F, +0x4955,0x4067,0x7F3C,0x0000,0x0000,0x2138,0x5040,0x5042, +0x0000,0x2E28,0x0000,0x4265,0x4E61,0x304A,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7F3B,0x0000,0x5041,0x323E,0x0000, +0x3644,0x7F3D,0x4367,0x0000,0x0000,0x7F3E,0x376F,0x5043, +0x0000,0x0000,0x0000,0x4724,0x0000,0x2E29,0x0000,0x2E2A, + +/* 4F00h */ +0x7F3F,0x346B,0x0000,0x2E2B,0x0000,0x0000,0x0000,0x0000, +0x0000,0x5044,0x304B,0x2E2C,0x0000,0x3860,0x346C,0x497A, +0x4832,0x3559,0x0000,0x0000,0x0000,0x0000,0x7F40,0x0000, +0x0000,0x0000,0x3271,0x0000,0x5067,0x4541,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x476C, +0x5046,0x0000,0x0000,0x0000,0x483C,0x0000,0x4E62,0x7F42, +0x3F2D,0x0000,0x3B47,0x0000,0x3B77,0x3240,0x7F43,0x0000, +0x0000,0x0000,0x0000,0x4451,0x0000,0x0000,0x4322,0x504A, +0x2E2E,0x2E2F,0x0000,0x0000,0x0000,0x304C,0x4463,0x3D3B, +0x3A34,0x4D24,0x0000,0x424E,0x7F44,0x323F,0x2E30,0x5049, +0x7F45,0x4D3E,0x5045,0x5047,0x3A6E,0x5048,0x5524,0x2E31, +0x2E2D,0x0000,0x0000,0x0000,0x7F41,0x0000,0x0000,0x0000, +0x0000,0x5050,0x2E32,0x0000,0x2E33,0x0000,0x0000,0x5053, +0x5051,0x0000,0x0000,0x3242,0x0000,0x4A3B,0x504B,0x7F47, +0x7F48,0x0000,0x7F49,0x504F,0x3873,0x7F4A,0x2E34,0x3B48, +0x0000,0x0000,0x7F4B,0x3426,0x0000,0x7F4C,0x5054,0x0000, +0x504C,0x0000,0x2E35,0x4E63,0x0000,0x3B78,0x0000,0x504D, +0x0000,0x5052,0x7F4D,0x0000,0x2E36,0x0000,0x5055,0x2E37, +0x504E,0x0000,0x7F4E,0x3621,0x0000,0x304D,0x0000,0x0000, +0x3622,0x3241,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x5525,0x0000,0x4B79,0x496E,0x3874, +0x0000,0x0000,0x7F50,0x0000,0x0000,0x3F2F,0x4E37,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7F51,0x4A58, +0x0000,0x0000,0x3738,0x4225,0x3264,0x7F52,0x0000,0x0000, +0x0000,0x2E39,0x3D53,0x7F53,0x0000,0x0000,0x5059,0x7F54, +0x505E,0x505C,0x7F55,0x0000,0x5057,0x0000,0x0000,0x422F, +0x505A,0x0000,0x505D,0x505B,0x0000,0x4A5D,0x0000,0x5058, +0x2E3A,0x3F2E,0x0000,0x4B73,0x505F,0x5060,0x7F4F,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3D24,0x506D, +0x0000,0x2E21,0x7F57,0x4750,0x0000,0x4936,0x5068,0x0000, +0x4A70,0x0000,0x3236,0x0000,0x0000,0x0000,0x506C,0x0000, + +/* 5000h */ +0x7F58,0x2E3B,0x2E3C,0x0000,0x0000,0x5066,0x506F,0x0000, +0x0000,0x4152,0x0000,0x3844,0x0000,0x475C,0x2E3D,0x6047, +0x7F59,0x506E,0x455D,0x7F5A,0x5063,0x0000,0x3876,0x0000, +0x2E3E,0x3875,0x5061,0x0000,0x7F5B,0x0000,0x7F5C,0x3C5A, +0x0000,0x5069,0x7F5D,0x4A6F,0x434D,0x5065,0x3771,0x2E3F, +0x5062,0x506A,0x5064,0x4E51,0x506B,0x4F41,0x2E40,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3666,0x0000, +0x0000,0x3770,0x0000,0x2E42,0x0000,0x0000,0x0000,0x0000, +0x2E41,0x2E43,0x7F5F,0x5070,0x0000,0x0000,0x7F60,0x5071, +0x5075,0x304E,0x0000,0x0000,0x0000,0x0000,0x7F61,0x4A50, +0x5074,0x0000,0x0000,0x7F62,0x0000,0x5073,0x5077,0x7F63, +0x0000,0x0000,0x5076,0x0000,0x4464,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7F64,0x0000,0x3772,0x7F65,0x0000, +0x0000,0x0000,0x7F66,0x0000,0x5078,0x0000,0x0000,0x0000, +0x7F67,0x0000,0x3C45,0x0000,0x4226,0x4465,0x3676,0x0000, +0x5079,0x0000,0x0000,0x0000,0x0000,0x3536,0x0000,0x0000, +0x507A,0x0000,0x0000,0x0000,0x0000,0x507C,0x0000,0x0000, +0x7F69,0x0000,0x0000,0x0000,0x0000,0x4B35,0x0000,0x0000, +0x0000,0x3766,0x7F6A,0x7F6B,0x2E44,0x7F6C,0x7F6D,0x0000, +0x3B31,0x4877,0x507B,0x0000,0x7F6E,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7F68,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7F6F,0x0000,0x3A45,0x4D43,0x0000,0x0000, +0x0000,0x7F71,0x507E,0x5123,0x507D,0x3A44,0x0000,0x3D7D, +0x0000,0x0000,0x7F72,0x7F73,0x0000,0x0000,0x3739,0x0000, +0x0000,0x0000,0x5124,0x0000,0x7F74,0x364F,0x0000,0x7F75, +0x0000,0x5121,0x5122,0x0000,0x2E45,0x462F,0x7F78,0x417C, +0x2E47,0x3623,0x0000,0x0000,0x7F7A,0x4B4D,0x5125,0x0000, +0x0000,0x7F7B,0x4E3D,0x0000,0x0000,0x0000,0x5126,0x0000, +0x0000,0x7F7C,0x0000,0x5129,0x0000,0x5127,0x2E48,0x414E, +0x0000,0x7F7D,0x0000,0x0000,0x0000,0x5128,0x512A,0x0000, +0x0000,0x0000,0x2E46,0x7F76,0x0000,0x512C,0x0000,0x0000, +0x0000,0x512B,0x0000,0x4A48,0x0000,0x0000,0x0000,0x0000, + +/* 5100h */ +0x3537,0x512E,0x512F,0x2E4B,0x322F,0x0000,0x2E4A,0x0000, +0x8121,0x512D,0x0000,0x2E4C,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x3C74,0x0000,0x5132,0x5131,0x5130,0x8123, +0x5056,0x0000,0x5133,0x8124,0x0000,0x0000,0x2E4D,0x3D7E, +0x0000,0x5134,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4D25,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4C59,0x0000,0x0000,0x2E4E,0x0000,0x5136, +0x0000,0x0000,0x5135,0x5138,0x5137,0x0000,0x0000,0x5139, +0x513A,0x3074,0x0000,0x3835,0x373B,0x3D3C,0x437B,0x3624, +0x4068,0x3877,0x2E4F,0x396E,0x513C,0x4C48,0x4546,0x0000, +0x3B79,0x0000,0x513B,0x0000,0x513D,0x2E51,0x0000,0x2E52, +0x0000,0x0000,0x455E,0x0000,0x3375,0x0000,0x0000,0x0000, +0x8126,0x0000,0x513E,0x0000,0x0000,0x467E,0x0000,0x0000, +0x4134,0x5140,0x5141,0x482C,0x3878,0x4F3B,0x5142,0x0000, +0x0000,0x3626,0x0000,0x8128,0x0000,0x4A3C,0x4236,0x3671, +0x4535,0x0000,0x0000,0x8E74,0x3773,0x0000,0x0000,0x0000, +0x5143,0x0000,0x5144,0x8129,0x0000,0x4662,0x315F,0x0000, +0x0000,0x5147,0x3A7D,0x812A,0x5146,0x3A46,0x0000,0x5148, +0x666E,0x5149,0x4B41,0x514A,0x0000,0x514B,0x514C,0x3E69, +0x812C,0x3C4C,0x0000,0x0000,0x0000,0x2E54,0x0000,0x0000, +0x3427,0x0000,0x514F,0x812D,0x514D,0x4C3D,0x514E,0x0000, +0x495A,0x5150,0x5151,0x5152,0x455F,0x812E,0x0000,0x0000, +0x5156,0x5154,0x5155,0x5153,0x3A63,0x5157,0x4C6A,0x4E64, +0x0000,0x0000,0x0000,0x0000,0x8130,0x5158,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2E55,0x4028,0x5159,0x3D5A,0x0000, +0x0000,0x515A,0x2E56,0x437C,0x4E3F,0x4560,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5245,0x0000, +0x0000,0x0000,0x0000,0x515B,0x7425,0x3645,0x2E57,0x0000, +0x515C,0x4B5E,0x2E58,0x0000,0x0000,0x0000,0x3D68,0x427C, +0x0000,0x515E,0x4664,0x0000,0x0000,0x515F,0x2E59,0x0000, +0x5160,0x332E,0x0000,0x8133,0x8134,0x5161,0x3627,0x0000, +0x464C,0x317A,0x3D50,0x0000,0x0000,0x4821,0x5162,0x0000, + +/* 5200h */ +0x4561,0x2E5A,0x8135,0x3F4F,0x5163,0x0000,0x4A2C,0x405A, +0x3422,0x0000,0x3429,0x5164,0x0000,0x0000,0x5166,0x0000, +0x0000,0x373A,0x8136,0x2E5C,0x5165,0x2E5D,0x8137,0x4E73, +0x0000,0x0000,0x0000,0x0000,0x0000,0x3D69,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x483D,0x4A4C,0x0000,0x5167, +0x0000,0x4D78,0x5168,0x0000,0x0000,0x0000,0x5169,0x0000, +0x457E,0x0000,0x0000,0x516A,0x0000,0x0000,0x4029,0x3A7E, +0x3774,0x516B,0x3B49,0x396F,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x4466,0x516D,0x0000,0x0000,0x4227, +0x0000,0x2E5E,0x3A6F,0x516E,0x516F,0x4130,0x0000,0x516C, +0x0000,0x0000,0x0000,0x0000,0x5171,0x8139,0x4B36,0x2E5F, +0x0000,0x0000,0x0000,0x3964,0x813A,0x2F7E,0x5170,0x0000, +0x0000,0x2E60,0x0000,0x3775,0x3A5E,0x476D,0x0000,0x0000, +0x0000,0x5174,0x5172,0x0000,0x813B,0x0000,0x0000,0x497B, +0x3E6A,0x517B,0x3364,0x5175,0x5173,0x414F,0x0000,0x813C, +0x0000,0x0000,0x0000,0x0000,0x0000,0x5177,0x0000,0x5176, +0x0000,0x0000,0x813E,0x3344,0x813D,0x0000,0x0000,0x3760, +0x517C,0x4E2D,0x0000,0x0000,0x0000,0x5178,0x0000,0x0000, +0x0000,0x517D,0x517A,0x2E61,0x5179,0x0000,0x0000,0x0000, +0x8140,0x0000,0x0000,0x4E4F,0x0000,0x0000,0x0000,0x3879, +0x3243,0x0000,0x0000,0x4E74,0x8142,0x0000,0x8143,0x0000, +0x0000,0x3D75,0x4558,0x3965,0x5222,0x5223,0x0000,0x8144, +0x0000,0x4E65,0x0000,0x0000,0x4F2B,0x5225,0x0000,0x0000, +0x0000,0x387A,0x8145,0x8146,0x5224,0x0000,0x332F,0x0000, +0x0000,0x5226,0x0000,0x4B56,0x0000,0x443C,0x0000,0x4D26, +0x2E62,0x4A59,0x8147,0x0000,0x2E64,0x5227,0x0000,0x0000, +0x2E65,0x8149,0x7055,0x0000,0x0000,0x4630,0x2E66,0x5228, +0x342A,0x4C33,0x0000,0x2E67,0x0000,0x3E21,0x5229,0x4A67, +0x522D,0x0000,0x402A,0x522A,0x3650,0x0000,0x522B,0x342B, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2E69,0x0000,0x372E,0x522E,0x0000,0x522F,0x0000,0x814B, +0x5230,0x5231,0x3C5B,0x2E6A,0x0000,0x0000,0x387B,0x4C5E, + +/* 5300h */ +0x2E6B,0x4C68,0x4677,0x0000,0x0000,0x4A71,0x5232,0x2E6C, +0x5233,0x0000,0x814C,0x814D,0x0000,0x5235,0x0000,0x5237, +0x5236,0x0000,0x0000,0x0000,0x0000,0x5238,0x323D,0x4B4C, +0x0000,0x3A7C,0x5239,0x0000,0x2E6D,0x4159,0x0000,0x0000, +0x3E22,0x3629,0x0000,0x523A,0x814E,0x0000,0x0000,0x0000, +0x0000,0x0000,0x485B,0x0000,0x0000,0x0000,0x0000,0x523B, +0x0000,0x523C,0x0000,0x523D,0x0000,0x814F,0x0000,0x0000, +0x523E,0x4924,0x3668,0x3065,0x0000,0x0000,0x8150,0x463F, +0x523F,0x3D3D,0x8151,0x4069,0x0000,0x5241,0x5240,0x3E23, +0x3861,0x5243,0x483E,0x0000,0x0000,0x5244,0x0000,0x0000, +0x0000,0x485C,0x4234,0x426E,0x3628,0x0000,0x0000,0x466E, +0x4331,0x0000,0x476E,0x0000,0x4B4E,0x0000,0x5246,0x0000, +0x406A,0x2E6F,0x0000,0x2E70,0x0000,0x0000,0x3735,0x8154, +0x0000,0x5247,0x0000,0x0000,0x8155,0x0000,0x5248,0x312C, +0x3075,0x346D,0x0000,0x4228,0x3551,0x4D71,0x0000,0x524B, +0x3237,0x0000,0x8156,0x524A,0x0000,0x2E71,0x0000,0x362A, +0x0000,0x0000,0x524C,0x0000,0x4C71,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2E72,0x0000,0x0000,0x524D,0x0000, +0x4E52,0x0000,0x387C,0x0000,0x0000,0x2E73,0x0000,0x3836, +0x524E,0x0000,0x0000,0x0000,0x8157,0x5250,0x524F,0x0000, +0x3F5F,0x3139,0x0000,0x0000,0x0000,0x315E,0x5251,0x0000, +0x5252,0x0000,0x2E74,0x3837,0x8158,0x0000,0x5253,0x815A, +0x0000,0x0000,0x0000,0x356E,0x0000,0x0000,0x0000,0x0000, +0x815B,0x0000,0x3B32,0x5254,0x0000,0x0000,0x0000,0x0000, +0x4B74,0x3A35,0x355A,0x4D27,0x4150,0x483F,0x3C7D,0x0000, +0x0000,0x0000,0x0000,0x0000,0x3D47,0x815F,0x3C68,0x3C75, +0x0000,0x3D76,0x8160,0x4840,0x0000,0x0000,0x0000,0x5257, +0x0000,0x3143,0x4151,0x387D,0x3845,0x3667,0x0000,0x0000, +0x525B,0x4321,0x427E,0x362B,0x3E24,0x525C,0x525A,0x3244, +0x4266,0x3C38,0x3B4B,0x3126,0x8162,0x8163,0x3370,0x3966, +0x3B4A,0x0000,0x525D,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 5400h */ +0x0000,0x525E,0x0000,0x3549,0x3346,0x0000,0x0000,0x0000, +0x3967,0x3548,0x445F,0x3125,0x4631,0x4C3E,0x3921,0x4D79, +0x4547,0x387E,0x2E75,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x372F,0x0000,0x5267,0x4F7E,0x3663, +0x4B4A,0x0000,0x0000,0x0000,0x8165,0x0000,0x485D,0x2E76, +0x8166,0x5266,0x0000,0x345E,0x5261,0x5262,0x5264,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5265,0x0000, +0x355B,0x3F61,0x0000,0x4A2D,0x5263,0x525F,0x3863,0x0000, +0x5260,0x0000,0x4F24,0x8168,0x0000,0x0000,0x4A72,0x0000, +0x4468,0x3862,0x3970,0x0000,0x0000,0x2E77,0x5268,0x0000, +0x0000,0x465D,0x0000,0x0000,0x0000,0x8164,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x526C, +0x0000,0x0000,0x8169,0x0000,0x0000,0x0000,0x816A,0x0000, +0x3C7E,0x0000,0x3C76,0x2E79,0x816B,0x0000,0x0000,0x0000, +0x526F,0x526D,0x0000,0x4C23,0x2E7A,0x526A,0x5273,0x526E, +0x0000,0x0000,0x0000,0x5271,0x3846,0x4C3F,0x0000,0x2E7B, +0x5272,0x0000,0x0000,0x0000,0x5274,0x0000,0x5276,0x0000, +0x2E7C,0x0000,0x816C,0x3A70,0x4F42,0x816D,0x526B,0x5269, +0x5275,0x0000,0x5270,0x0000,0x0000,0x816E,0x2E7D,0x0000, +0x0000,0x0000,0x0000,0x0000,0x2E78,0x0000,0x0000,0x0000, +0x816F,0x2E7E,0x5278,0x0000,0x5323,0x527A,0x8170,0x0000, +0x527E,0x2F21,0x0000,0x5321,0x527B,0x8171,0x8172,0x533E, +0x0000,0x0000,0x3A69,0x3331,0x0000,0x0000,0x0000,0x8173, +0x5279,0x0000,0x8174,0x0000,0x5325,0x3076,0x5324,0x8175, +0x3025,0x494A,0x5322,0x8176,0x527C,0x0000,0x2F22,0x5277, +0x527D,0x3A48,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5326,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3077,0x532F,0x0000,0x0000,0x5327,0x5328,0x0000, +0x3E25,0x4B69,0x0000,0x0000,0x8178,0x532D,0x532C,0x8179, +0x0000,0x817A,0x452F,0x817B,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x532E,0x0000,0x0000,0x532B,0x0000,0x2F23, + +/* 5500h */ +0x817C,0x817D,0x0000,0x0000,0x3134,0x0000,0x3A36,0x3F30, +0x0000,0x817E,0x0000,0x0000,0x0000,0x0000,0x2F24,0x5329, +0x4562,0x0000,0x0000,0x0000,0x532A,0x0000,0x3022,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2F25,0x0000,0x0000,0x5334,0x4D23, +0x0000,0x3E27,0x0000,0x533A,0x0000,0x2F26,0x0000,0x0000, +0x5339,0x5330,0x0000,0x0000,0x8221,0x0000,0x4243,0x0000, +0x5331,0x8222,0x0000,0x0000,0x426F,0x5336,0x3E26,0x8224, +0x0000,0x0000,0x8225,0x0000,0x5333,0x0000,0x0000,0x4C64, +0x2F27,0x0000,0x0000,0x373C,0x0000,0x0000,0x5337,0x5338, +0x0000,0x0000,0x0000,0x0000,0x5335,0x533B,0x2F28,0x0000, +0x8227,0x8228,0x0000,0x5332,0x8229,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x5341,0x5346,0x822B,0x5342,0x0000, +0x533D,0x2F29,0x822C,0x5347,0x4131,0x0000,0x2F2A,0x5349, +0x822D,0x3922,0x533F,0x437D,0x0000,0x0000,0x2F2B,0x0000, +0x0000,0x822E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5343,0x533C,0x342D,0x0000,0x346E,0x3365,0x5344,0x5340, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3776, +0x534A,0x5348,0x4153,0x354A,0x362C,0x2F2D,0x5345,0x0000, +0x3674,0x0000,0x0000,0x0000,0x0000,0x0000,0x3144,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8233, +0x0000,0x0000,0x0000,0x0000,0x534E,0x534C,0x0000,0x5427, +0x0000,0x8234,0x0000,0x0000,0x8235,0x0000,0x2F2E,0x0000, +0x0000,0x8236,0x8230,0x0000,0x5351,0x0000,0x0000,0x0000, +0x0000,0x0000,0x534B,0x0000,0x534F,0x8237,0x0000,0x534D, +0x0000,0x0000,0x8239,0x3B4C,0x5350,0x0000,0x0000,0x0000, +0x0000,0x823B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5353, +0x0000,0x5358,0x0000,0x0000,0x0000,0x5356,0x5355,0x0000, + +/* 5600h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4332,0x823E, +0x2F30,0x3245,0x0000,0x0000,0x0000,0x0000,0x2F31,0x0000, +0x823F,0x0000,0x0000,0x0000,0x5352,0x0000,0x5354,0x3E28, +0x3133,0x0000,0x0000,0x5357,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x823C,0x325E,0x0000,0x0000,0x0000,0x0000,0x0000,0x5362, +0x8240,0x3E7C,0x535E,0x0000,0x535C,0x0000,0x535D,0x8241, +0x535F,0x0000,0x0000,0x2F32,0x0000,0x8243,0x0000,0x8244, +0x8245,0x0000,0x313D,0x0000,0x0000,0x0000,0x0000,0x8246, +0x0000,0x2F33,0x0000,0x0000,0x4139,0x0000,0x5359,0x0000, +0x535A,0x0000,0x0000,0x7427,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x337A,0x0000,0x0000,0x8247,0x0000, +0x8248,0x0000,0x0000,0x0000,0x5361,0x0000,0x2F35,0x0000, +0x346F,0x0000,0x5364,0x5360,0x5363,0x8249,0x0000,0x2F37, +0x0000,0x2F38,0x2F39,0x0000,0x4A2E,0x0000,0x2F34,0x0000, +0x4655,0x0000,0x4838,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5366,0x0000,0x0000,0x0000,0x0000,0x0000,0x5365,0x3345, +0x824B,0x0000,0x5367,0x0000,0x824C,0x0000,0x0000,0x536A, +0x0000,0x0000,0x0000,0x0000,0x5369,0x824D,0x0000,0x0000, +0x0000,0x2F3A,0x824E,0x0000,0x0000,0x824F,0x2F3B,0x0000, +0x5368,0x0000,0x4739,0x0000,0x0000,0x536B,0x0000,0x0000, +0x8250,0x2F3C,0x0000,0x0000,0x2F3D,0x8251,0x536C,0x0000, +0x0000,0x0000,0x8252,0x2F3E,0x536E,0x0000,0x536D,0x0000, +0x0000,0x0000,0x0000,0x0000,0x5370,0x0000,0x0000,0x0000, +0x5373,0x5371,0x536F,0x5372,0x0000,0x8253,0x0000,0x0000, +0x5374,0x2F3F,0x2F40,0x0000,0x0000,0x8254,0x5375,0x0000, +0x0000,0x5376,0x0000,0x5377,0x0000,0x0000,0x0000,0x5378, +0x5145,0x0000,0x3C7C,0x3B4D,0x0000,0x0000,0x3273,0x8255, +0x3078,0x0000,0x0000,0x4344,0x0000,0x0000,0x0000,0x0000, +0x8256,0x0000,0x0000,0x0000,0x0000,0x0000,0x5379,0x0000, +0x3A24,0x0000,0x304F,0x3F5E,0x0000,0x0000,0x8257,0x8258, +0x0000,0x537A,0x3847,0x0000,0x0000,0x3971,0x0000,0x537C, + +/* 5700h */ +0x537B,0x0000,0x0000,0x4A60,0x537D,0x0000,0x0000,0x0000, +0x5421,0x537E,0x2F41,0x5422,0x0000,0x5423,0x0000,0x3777, +0x0000,0x0000,0x3160,0x5424,0x0000,0x825A,0x5426,0x0000, +0x5425,0x0000,0x0000,0x0000,0x5428,0x0000,0x0000,0x455A, +0x0000,0x2F43,0x0000,0x825B,0x0000,0x0000,0x5429,0x3035, +0x3A5F,0x825D,0x0000,0x0000,0x0000,0x373D,0x0000,0x2F44, +0x434F,0x0000,0x0000,0x2F45,0x2F46,0x0000,0x0000,0x542A, +0x542B,0x0000,0x0000,0x542D,0x0000,0x0000,0x0000,0x0000, +0x542E,0x0000,0x3A64,0x0000,0x0000,0x825F,0x8260,0x3651, +0x0000,0x0000,0x4B37,0x0000,0x8261,0x8262,0x542C,0x542F, +0x3A41,0x3923,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x5433,0x0000,0x0000,0x3A25,0x0000,0x4333,0x0000, +0x8264,0x5430,0x445A,0x0000,0x0000,0x0000,0x0000,0x8265, +0x2F47,0x0000,0x0000,0x8266,0x8267,0x8268,0x0000,0x2F48, +0x0000,0x0000,0x0000,0x8269,0x2F49,0x0000,0x0000,0x5434, +0x0000,0x0000,0x3F62,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5432,0x5435,0x0000,0x373F,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x5436,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x826D,0x0000,0x2F4A,0x826E,0x826F,0x0000, +0x5437,0x0000,0x3924,0x3340,0x5439,0x0000,0x0000,0x0000, +0x8270,0x0000,0x543A,0x0000,0x826C,0x0000,0x0000,0x0000, +0x543B,0x0000,0x0000,0x5438,0x0000,0x0000,0x0000,0x0000, +0x2F4D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5431,0x0000,0x0000,0x543C,0x0000,0x0000,0x543D,0x2F4E, +0x2F4F,0x0000,0x0000,0x4B64,0x8273,0x0000,0x3E6B,0x2F50, +0x0000,0x0000,0x543F,0x5440,0x543E,0x0000,0x5442,0x8271, +0x0000,0x0000,0x0000,0x0000,0x4738,0x0000,0x8276,0x3068, +0x4956,0x0000,0x0000,0x5443,0x2F51,0x0000,0x8277,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x2F52,0x0000,0x0000, +0x8278,0x0000,0x0000,0x0000,0x3E7D,0x2F53,0x2F54,0x3C39, +0x827A,0x475D,0x3470,0x827B,0x3A6B,0x827C,0x0000,0x2F55, + +/* 5800h */ +0x4B59,0x0000,0x4632,0x0000,0x827D,0x3778,0x424F,0x0000, +0x0000,0x2F56,0x5441,0x5444,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x4244,0x0000,0x0000, +0x0000,0x5445,0x0000,0x0000,0x0000,0x5446,0x827E,0x0000, +0x8321,0x5448,0x0000,0x0000,0x4469,0x0000,0x0000,0x8322, +0x0000,0x0000,0x342E,0x0000,0x0000,0x0000,0x0000,0x7421, +0x3161,0x4A73,0x8323,0x0000,0x3E6C,0x4548,0x0000,0x0000, +0x0000,0x8324,0x3A66,0x0000,0x0000,0x544E,0x0000,0x0000, +0x4A3D,0x4E5D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x8326,0x3274,0x544A,0x8327,0x0000,0x0000,0x0000, +0x0000,0x413A,0x544D,0x0000,0x4563,0x0000,0x0000,0x4549, +0x4564,0x4839,0x444D,0x0000,0x0000,0x0000,0x3A49,0x0000, +0x0000,0x2F58,0x5449,0x0000,0x2F59,0x0000,0x0000,0x8328, +0x0000,0x3176,0x0000,0x4536,0x0000,0x0000,0x0000,0x0000, +0x544B,0x0000,0x5447,0x0000,0x0000,0x3F50,0x0000,0x0000, +0x0000,0x544F,0x0000,0x0000,0x2F5B,0x0000,0x3D4E,0x0000, +0x0000,0x0000,0x0000,0x362D,0x0000,0x5450,0x0000,0x0000, +0x0000,0x2F5C,0x8329,0x832A,0x0000,0x832B,0x0000,0x832C, +0x832D,0x0000,0x0000,0x4A68,0x832E,0x0000,0x0000,0x417D, +0x0000,0x0000,0x0000,0x0000,0x4446,0x832F,0x2F5D,0x5452, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4B4F,0x2F5F,0x8330,0x5453,0x0000,0x0000,0x5458,0x0000, +0x0000,0x8331,0x0000,0x4A2F,0x0000,0x0000,0x0000,0x0000, +0x5457,0x5451,0x5454,0x5456,0x0000,0x0000,0x3A26,0x0000, +0x0000,0x4A49,0x0000,0x8333,0x0000,0x5459,0x0000,0x4345, +0x0000,0x0000,0x3275,0x0000,0x3E6D,0x8334,0x2F62,0x0000, +0x0000,0x545B,0x2F61,0x545A,0x2F63,0x3968,0x0000,0x545C, +0x545E,0x545D,0x2F64,0x0000,0x5460,0x0000,0x5455,0x5462, +0x2F65,0x0000,0x8335,0x0000,0x5461,0x545F,0x0000,0x0000, +0x0000,0x2F66,0x0000,0x3B4E,0x3F51,0x0000,0x4154,0x5463, +0x403C,0x306D,0x4764,0x8336,0x8337,0x0000,0x0000,0x445B, +0x0000,0x5465,0x5464,0x5466,0x5467,0x5468,0x0000,0x0000, + +/* 5900h */ +0x0000,0x0000,0x5469,0x0000,0x0000,0x8338,0x8339,0x0000, +0x0000,0x4A51,0x546A,0x833A,0x2F67,0x833B,0x0000,0x3246, +0x546B,0x0000,0x0000,0x0000,0x833C,0x4D3C,0x3330,0x0000, +0x5249,0x3D48,0x423F,0x546C,0x4C6B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4C34,0x0000,0x833D,0x546E,0x0000,0x4267, +0x0000,0x4537,0x4240,0x4957,0x546F,0x5470,0x317B,0x0000, +0x0000,0x3C3A,0x5471,0x0000,0x0000,0x0000,0x0000,0x3050, +0x5472,0x0000,0x0000,0x0000,0x0000,0x8340,0x5473,0x0000, +0x0000,0x0000,0x0000,0x0000,0x3162,0x0000,0x8342,0x3471, +0x4660,0x4A74,0x0000,0x0000,0x0000,0x0000,0x5477,0x4155, +0x5476,0x3740,0x0000,0x0000,0x4B5B,0x5475,0x0000,0x4565, +0x5479,0x0000,0x5478,0x8345,0x0000,0x2F69,0x0000,0x8346, +0x547B,0x0000,0x547A,0x0000,0x0000,0x317C,0x0000,0x547C, +0x3E29,0x547E,0x4325,0x0000,0x547D,0x2F6A,0x4A33,0x0000, +0x0000,0x0000,0x0000,0x3D77,0x455B,0x8348,0x8349,0x0000, +0x5521,0x0000,0x0000,0x0000,0x834A,0x3925,0x0000,0x0000, +0x0000,0x5522,0x4721,0x485E,0x4C51,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4725,0x2F6B,0x0000,0x552B,0x0000,0x0000, +0x0000,0x0000,0x2F6C,0x3538,0x0000,0x0000,0x4D45,0x0000, +0x0000,0x4C2F,0x0000,0x562C,0x0000,0x5523,0x0000,0x834B, +0x0000,0x0000,0x0000,0x5526,0x2F6D,0x4245,0x0000,0x0000, +0x4B38,0x0000,0x0000,0x0000,0x454A,0x0000,0x834C,0x0000, +0x0000,0x0000,0x5527,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4B65,0x0000,0x3A4A,0x834D,0x0000,0x3E2A,0x0000, +0x0000,0x0000,0x0000,0x2F6E,0x0000,0x0000,0x5528,0x0000, +0x834E,0x3B50,0x0000,0x3B4F,0x0000,0x834F,0x0000,0x0000, +0x3039,0x3848,0x2F6F,0x402B,0x3051,0x0000,0x0000,0x0000, +0x0000,0x552C,0x552D,0x0000,0x552A,0x2F70,0x8350,0x0000, +0x0000,0x0000,0x0000,0x8351,0x8352,0x3138,0x342F,0x8353, +0x5529,0x0000,0x4C45,0x4931,0x0000,0x0000,0x8354,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3028,0x0000, +0x7E7A,0x0000,0x0000,0x3079,0x0000,0x0000,0x0000,0x3B51, + +/* 5A00h */ +0x0000,0x3052,0x0000,0x3023,0x0000,0x0000,0x0000,0x0000, +0x0000,0x5532,0x0000,0x0000,0x8358,0x8359,0x0000,0x0000, +0x0000,0x5530,0x0000,0x2F71,0x0000,0x0000,0x0000,0x835A, +0x4C3C,0x0000,0x5533,0x0000,0x5531,0x0000,0x0000,0x552F, +0x3F31,0x0000,0x0000,0x2F72,0x0000,0x552E,0x0000,0x835B, +0x0000,0x4A5A,0x0000,0x0000,0x0000,0x835C,0x0000,0x3864, +0x0000,0x0000,0x0000,0x0000,0x0000,0x5537,0x5538,0x0000, +0x0000,0x0000,0x0000,0x0000,0x3E2B,0x0000,0x0000,0x0000, +0x5534,0x4F2C,0x0000,0x0000,0x0000,0x0000,0x474C,0x0000, +0x0000,0x5536,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x835D,0x0000,0x0000, +0x0000,0x0000,0x3A27,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x5539,0x0000,0x0000,0x835E,0x4958,0x2F73, +0x0000,0x0000,0x553A,0x0000,0x5535,0x2F74,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2F75, +0x0000,0x0000,0x835F,0x0000,0x0000,0x0000,0x2F76,0x4C3B, +0x0000,0x0000,0x0000,0x0000,0x2F77,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x8360,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x475E,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x553B,0x4932,0x8361,0x0000,0x2F78,0x8362, +0x8363,0x0000,0x8364,0x0000,0x0000,0x0000,0x0000,0x2F79, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x8365,0x0000,0x8366,0x0000,0x8367,0x0000,0x0000, +0x0000,0x0000,0x8368,0x0000,0x553C,0x5540,0x553D,0x8369, +0x0000,0x3247,0x553F,0x0000,0x2F7A,0x0000,0x0000,0x0000, +0x0000,0x3C3B,0x0000,0x553E,0x3779,0x0000,0x0000,0x0000, +0x554C,0x0000,0x0000,0x0000,0x0000,0x0000,0x5545,0x5542, +0x0000,0x0000,0x836A,0x0000,0x836B,0x0000,0x0000,0x0000, +0x836C,0x4364,0x0000,0x5541,0x0000,0x836D,0x5543,0x0000, +0x0000,0x5544,0x0000,0x0000,0x0000,0x0000,0x836F,0x0000, +0x836E,0x0000,0x0000,0x0000,0x0000,0x8370,0x0000,0x0000, +0x0000,0x0000,0x5546,0x5547,0x0000,0x0000,0x0000,0x0000, + +/* 5B00h */ +0x8371,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8372,0x3472,0x0000,0x5549,0x5548,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x554A,0x8373, +0x0000,0x2F7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x3E6E,0x0000,0x0000,0x2F7D,0x0000,0x0000, +0x0000,0x0000,0x554D,0x0000,0x445C,0x8375,0x0000,0x0000, +0x3145,0x0000,0x554B,0x0000,0x8374,0x0000,0x554E,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x554F,0x0000, +0x5552,0x4F55,0x0000,0x5550,0x0000,0x5551,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x8376,0x0000,0x0000,0x0000, +0x3B52,0x5553,0x8377,0x0000,0x3926,0x5554,0x4F56,0x3B7A, +0x4238,0x0000,0x5555,0x5556,0x3B5A,0x3927,0x0000,0x4C52, +0x0000,0x0000,0x0000,0x3528,0x3849,0x5557,0x3358,0x0000, +0x8378,0x5558,0x0000,0x4239,0x0000,0x0000,0x0000,0x8379, +0x5559,0x5623,0x0000,0x555A,0x0000,0x555B,0x0000,0x0000, +0x555C,0x0000,0x555E,0x0000,0x837A,0x4F57,0x0000,0x837B, +0x555F,0x837C,0x0000,0x5560,0x837D,0x4270,0x0000,0x3127, +0x3C69,0x3042,0x0000,0x4157,0x3430,0x3C35,0x0000,0x3928, +0x0000,0x0000,0x0000,0x4F58,0x0000,0x4566,0x8021,0x3D21, +0x3431,0x4368,0x446A,0x3038,0x3539,0x4A75,0x0000,0x3C42, +0x0000,0x0000,0x3552,0x406B,0x3C3C,0x4D28,0x5561,0x0000, +0x0000,0x0000,0x0000,0x0000,0x8022,0x0000,0x355C,0x0000, +0x3A4B,0x0000,0x0000,0x3332,0x3163,0x3E2C,0x3248,0x0000, +0x5562,0x4D46,0x0000,0x0000,0x0000,0x0000,0x0000,0x3D49, +0x8024,0x0000,0x3C64,0x5563,0x3473,0x4652,0x4C29,0x5564, +0x0000,0x5565,0x0000,0x0000,0x4959,0x0000,0x8026,0x0000, +0x5567,0x0000,0x3428,0x3677,0x5566,0x0000,0x8027,0x0000, +0x4F59,0x0000,0x0000,0x3432,0x0000,0x3F32,0x556B,0x3B21, +0x0000,0x3249,0x556A,0x0000,0x5568,0x556C,0x5569,0x472B, +0x5C4D,0x3F33,0x0000,0x556D,0x4F5A,0x0000,0x4E40,0x0000, +0x556E,0x802A,0x0000,0x5570,0x0000,0x437E,0x556F,0x0000, +0x4023,0x0000,0x3B7B,0x0000,0x0000,0x802B,0x4250,0x3C77, + +/* 5C00h */ +0x0000,0x4975,0x406C,0x802D,0x3C4D,0x5571,0x3E2D,0x5572, +0x5573,0x3053,0x423A,0x3F52,0x0000,0x5574,0x4633,0x3E2E, +0x0000,0x3E2F,0x4F5B,0x5575,0x0000,0x0000,0x406D,0x0000, +0x0000,0x0000,0x3E30,0x0000,0x0000,0x0000,0x4F5C,0x0000, +0x5576,0x0000,0x5577,0x4F5D,0x4C60,0x0000,0x0000,0x0000, +0x5578,0x802E,0x0000,0x4F5E,0x0000,0x3646,0x0000,0x0000, +0x802F,0x3D22,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5579,0x557A,0x3C5C,0x3F2C,0x4674,0x3F54,0x4878,0x4722, +0x3649,0x557B,0x0000,0x0000,0x0000,0x356F,0x557C,0x0000, +0x367E,0x0000,0x464F,0x3230,0x0000,0x3B53,0x557D,0x5622, +0x5621,0x367D,0x0000,0x557E,0x0000,0x4538,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7E7B,0x0000,0x0000,0x4230,0x8031, +0x454B,0x3C48,0x4F60,0x8032,0x4158,0x4D7A,0x0000,0x8033, +0x8034,0x8035,0x0000,0x0000,0x5624,0x0000,0x5625,0x4656, +0x8036,0x3B33,0x0000,0x0000,0x0000,0x0000,0x5627,0x0000, +0x0000,0x5628,0x4F64,0x0000,0x8039,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x803C,0x0000,0x803D,0x0000,0x5629,0x0000,0x0000,0x4F65, +0x3474,0x562A,0x0000,0x0000,0x562B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4F66, +0x8041,0x322C,0x8042,0x4F67,0x0000,0x0000,0x8043,0x8044, +0x413B,0x3464,0x4F68,0x562D,0x4C28,0x8046,0x0000,0x0000, +0x0000,0x4252,0x0000,0x3359,0x0000,0x8047,0x562F,0x5631, +0x345F,0x0000,0x4F69,0x562E,0x5630,0x0000,0x5633,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x5632,0x0000,0x5634, +0x0000,0x8049,0x0000,0x4F6A,0x0000,0x0000,0x0000,0x0000, +0x4F6B,0x0000,0x4F6C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x5635,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x463D,0x362E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x3265,0x5636,0x563B,0x0000,0x0000,0x5639,0x0000,0x4A77, +0x4A76,0x0000,0x0000,0x0000,0x4F6D,0x0000,0x4567,0x0000, +0x0000,0x0000,0x5638,0x3D54,0x0000,0x5637,0x0000,0x0000, + +/* 5D00h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x804C,0x3F72, +0x0000,0x0000,0x0000,0x563C,0x0000,0x4F70,0x3A6A,0x0000, +0x804D,0x5642,0x0000,0x0000,0x5643,0x563D,0x3333,0x563E, +0x5647,0x5646,0x5645,0x5641,0x0000,0x804F,0x0000,0x5640, +0x8050,0x0000,0x5644,0x0000,0x8051,0x0000,0x8052,0x4F71, +0x0000,0x4A78,0x0000,0x804E,0x0000,0x0000,0x0000,0x0000, +0x0000,0x8053,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x8054,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x8055,0x0000,0x0000,0x0000,0x4F73,0x4F74, +0x0000,0x0000,0x4F76,0x564B,0x5648,0x0000,0x564A,0x0000, +0x4D72,0x0000,0x5649,0x4F75,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x563F,0x0000,0x0000,0x0000, +0x0000,0x8057,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3F73,0x8058,0x0000,0x564C,0x4F77,0x0000,0x3A37, +0x805A,0x0000,0x0000,0x564D,0x0000,0x0000,0x564E,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4F78,0x5651,0x0000,0x5650,0x0000,0x0000,0x564F, +0x805D,0x0000,0x0000,0x4568,0x563A,0x0000,0x0000,0x0000, +0x5657,0x0000,0x805F,0x0000,0x8060,0x0000,0x0000,0x8061, +0x0000,0x8062,0x0000,0x0000,0x0000,0x5653,0x0000,0x0000, +0x4F79,0x0000,0x5652,0x0000,0x4F7A,0x0000,0x0000,0x4F7B, +0x0000,0x0000,0x0000,0x0000,0x5654,0x0000,0x5655,0x0000, +0x8063,0x0000,0x8064,0x0000,0x8065,0x0000,0x0000,0x5658, +0x4F7C,0x8067,0x4E66,0x0000,0x5659,0x5656,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x565A,0x0000,0x4F7D,0x3460,0x565B,0x0000,0x0000, +0x0000,0x8068,0x565D,0x565C,0x0000,0x0000,0x565E,0x8069, +0x806A,0x0000,0x0000,0x565F,0x0000,0x406E,0x3D23,0x0000, +0x806B,0x3D64,0x7428,0x4163,0x806D,0x3929,0x3A38,0x392A, +0x3570,0x806E,0x0000,0x5660,0x0000,0x0000,0x3A39,0x0000, +0x0000,0x384A,0x5661,0x4C26,0x4743,0x5662,0x0000,0x392B, +0x0000,0x0000,0x0000,0x342C,0x0000,0x4327,0x3652,0x0000, + +/* 5E00h */ +0x8070,0x0000,0x3B54,0x495B,0x0000,0x0000,0x4841,0x0000, +0x0000,0x0000,0x0000,0x5663,0x3475,0x0000,0x0000,0x0000, +0x0000,0x5666,0x8072,0x0000,0x7429,0x8073,0x4421,0x0000, +0x742A,0x5665,0x5664,0x5667,0x0000,0x446B,0x0000,0x8075, +0x0000,0x0000,0x0000,0x0000,0x0000,0x3F63,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3B55,0x0000,0x404A,0x8076,0x4253, +0x3522,0x0000,0x0000,0x4422,0x0000,0x0000,0x5668,0x5669, +0x3E6F,0x0000,0x0000,0x0000,0x0000,0x4B39,0x8077,0x0000, +0x566C,0x0000,0x0000,0x566B,0x566A,0x497D,0x0000,0x5673, +0x0000,0x8078,0x0000,0x0000,0x4B5A,0x0000,0x566D,0x0000, +0x0000,0x0000,0x0000,0x0000,0x566F,0x4B6B,0x807A,0x566E, +0x742B,0x0000,0x0000,0x0000,0x0000,0x0000,0x742C,0x5670, +0x0000,0x4828,0x5671,0x4A3E,0x5672,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x807C,0x807D,0x807E,0x8421,0x0000, +0x0000,0x0000,0x3433,0x4A3F,0x472F,0x5674,0x5675,0x7E7C, +0x392C,0x3434,0x5676,0x3838,0x4D44,0x4D29,0x3476,0x5678, +0x0000,0x4423,0x0000,0x392D,0x3E31,0x0000,0x0000,0x485F, +0x0000,0x0000,0x3E32,0x0000,0x0000,0x0000,0x0000,0x3D78, +0x0000,0x0000,0x0000,0x0000,0x0000,0x446C,0x4A79,0x4539, +0x0000,0x0000,0x392E,0x0000,0x495C,0x0000,0x0000,0x0000, +0x5679,0x0000,0x0000,0x0000,0x0000,0x8423,0x4559,0x3A42, +0x0000,0x0000,0x8424,0x384B,0x8425,0x446D,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x3043,0x3D6E,0x392F, +0x4D47,0x8426,0x0000,0x0000,0x0000,0x0000,0x742D,0x8427, +0x0000,0x567A,0x567B,0x4751,0x0000,0x0000,0x8428,0x0000, +0x567C,0x4E77,0x4F2D,0x742F,0x0000,0x0000,0x0000,0x567E, +0x567D,0x0000,0x8429,0x3347,0x0000,0x0000,0x5721,0x0000, +0x0000,0x842A,0x5724,0x5725,0x0000,0x5723,0x0000,0x4940, +0x3E33,0x5727,0x5726,0x5722,0x0000,0x0000,0x0000,0x0000, +0x5728,0x5729,0x0000,0x0000,0x572A,0x0000,0x0000,0x0000, +0x572D,0x572B,0x0000,0x572C,0x572E,0x0000,0x3164,0x446E, +0x572F,0x7430,0x377A,0x3276,0x4736,0x842C,0x5730,0x467B, + +/* 5F00h */ +0x7431,0x4A5B,0x7432,0x5731,0x4F2E,0x0000,0x0000,0x7433, +0x842D,0x5732,0x4A40,0x5735,0x5021,0x5031,0x842E,0x3C30, +0x4675,0x5736,0x0000,0x355D,0x4424,0x307A,0x5737,0x4A26, +0x3930,0x0000,0x0000,0x4350,0x842F,0x7434,0x8431,0x446F, +0x0000,0x0000,0x0000,0x7435,0x0000,0x4C6F,0x3839,0x384C, +0x0000,0x5738,0x0000,0x0000,0x0000,0x5739,0x0000,0x573F, +0x0000,0x3C65,0x0000,0x0000,0x7436,0x4425,0x7437,0x362F, +0x573A,0x0000,0x0000,0x0000,0x492B,0x7438,0x4346,0x0000, +0x7439,0x573B,0x0000,0x0000,0x0000,0x743A,0x0000,0x8432, +0x573C,0x0000,0x3630,0x0000,0x573D,0x0000,0x573E,0x0000, +0x0000,0x5740,0x0000,0x4576,0x743B,0x0000,0x5741,0x5742, +0x743C,0x5743,0x0000,0x0000,0x5734,0x5733,0x0000,0x0000, +0x0000,0x5744,0x3741,0x8433,0x743D,0x0000,0x4927,0x743E, +0x0000,0x3A4C,0x4937,0x4426,0x494B,0x5745,0x0000,0x0000, +0x3E34,0x3146,0x8434,0x5746,0x0000,0x0000,0x0000,0x5747, +0x0000,0x4C72,0x0000,0x0000,0x4860,0x743F,0x8435,0x574A, +0x317D,0x402C,0x5749,0x5748,0x3742,0x4254,0x0000,0x574E, +0x574C,0x7440,0x574B,0x4E27,0x3865,0x0000,0x0000,0x8436, +0x3D79,0x574D,0x454C,0x3D3E,0x0000,0x0000,0x0000,0x4640, +0x5751,0x5750,0x0000,0x0000,0x7441,0x0000,0x574F,0x0000, +0x5752,0x3866,0x8437,0x0000,0x8438,0x0000,0x0000,0x7442, +0x5753,0x497C,0x3D5B,0x0000,0x0000,0x5754,0x4879,0x7443, +0x0000,0x0000,0x0000,0x4641,0x4427,0x7444,0x0000,0x7445, +0x8439,0x4530,0x0000,0x0000,0x5755,0x352B,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3F34,0x843A,0x492C,0x0000,0x843C, +0x0000,0x7446,0x0000,0x843D,0x3477,0x4726,0x0000,0x0000, +0x0000,0x0000,0x843E,0x843F,0x8440,0x0000,0x5756,0x3B56, +0x4B3A,0x4B3B,0x0000,0x0000,0x317E,0x575B,0x7447,0x0000, +0x4369,0x7448,0x8441,0x0000,0x5758,0x0000,0x0000,0x0000, +0x0000,0x7449,0x0000,0x3277,0x0000,0x0000,0x8442,0x8443, +0x582D,0x575A,0x0000,0x8444,0x0000,0x4730,0x0000,0x0000, +0x5759,0x0000,0x0000,0x5757,0x8445,0x397A,0x0000,0x575D, + +/* 6000h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x744A,0x5763,0x5769, +0x5761,0x0000,0x455C,0x0000,0x744B,0x5766,0x495D,0x8447, +0x744C,0x5760,0x0000,0x5765,0x4E67,0x3B57,0x0000,0x0000, +0x4255,0x575E,0x8448,0x0000,0x8449,0x355E,0x5768,0x402D, +0x3165,0x5762,0x3278,0x5767,0x0000,0x0000,0x0000,0x3631, +0x0000,0x5764,0x0000,0x744D,0x0000,0x744E,0x0000,0x0000, +0x0000,0x0000,0x576A,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x576C,0x5776,0x5774,0x0000,0x0000,0x5771,0x744F, +0x0000,0x0000,0x5770,0x4E78,0x844B,0x5772,0x0000,0x0000, +0x3632,0x0000,0x3931,0x0000,0x0000,0x3D7A,0x0000,0x0000, +0x0000,0x5779,0x576B,0x0000,0x0000,0x0000,0x0000,0x576F, +0x575F,0x0000,0x327A,0x5773,0x5775,0x4351,0x0000,0x0000, +0x3A28,0x3238,0x576D,0x5778,0x5777,0x3633,0x0000,0x4229, +0x3366,0x0000,0x0000,0x0000,0x0000,0x3743,0x0000,0x576E, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x844C, +0x0000,0x577A,0x0000,0x577D,0x5821,0x0000,0x0000,0x0000, +0x0000,0x3C3D,0x844D,0x5827,0x4470,0x577B,0x0000,0x0000, +0x0000,0x0000,0x5825,0x0000,0x3279,0x844E,0x5823,0x5824, +0x0000,0x0000,0x577E,0x5822,0x0000,0x7451,0x7452,0x3867, +0x4D2A,0x0000,0x0000,0x3435,0x0000,0x0000,0x3159,0x5826, +0x844F,0x473A,0x302D,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8451,0x8452,0x4861,0x575C,0x582C,0x5830,0x4C65,0x0000, +0x5829,0x0000,0x0000,0x0000,0x4569,0x582E,0x8453,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x3E70,0x582F,0x4657, +0x8454,0x0000,0x0000,0x7453,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4F47,0x0000,0x582B,0x7454,0x7455,0x0000,0x0000, +0x5831,0x8455,0x397B,0x8456,0x404B,0x7456,0x0000,0x3054, +0x582A,0x5828,0x0000,0x415A,0x0000,0x0000,0x0000,0x577C, +0x3B34,0x0000,0x0000,0x0000,0x0000,0x0000,0x8457,0x0000, +0x4246,0x583D,0x8458,0x415B,0x5838,0x8459,0x5835,0x5836, +0x7457,0x3C66,0x5839,0x583C,0x0000,0x0000,0x0000,0x0000, + +/* 6100h */ +0x5837,0x3D25,0x0000,0x583A,0x0000,0x0000,0x5834,0x0000, +0x4C7C,0x4C7B,0x0000,0x0000,0x0000,0x583E,0x583F,0x3055, +0x845A,0x0000,0x845B,0x845C,0x0000,0x5833,0x0000,0x0000, +0x0000,0x845D,0x3672,0x3026,0x7458,0x0000,0x845E,0x3436, +0x0000,0x583B,0x0000,0x0000,0x0000,0x0000,0x0000,0x5843, +0x5842,0x0000,0x0000,0x7459,0x5847,0x0000,0x0000,0x0000, +0x745A,0x0000,0x0000,0x0000,0x5848,0x0000,0x0000,0x745B, +0x0000,0x0000,0x845F,0x0000,0x5846,0x5849,0x5841,0x5845, +0x0000,0x8461,0x584A,0x0000,0x584B,0x0000,0x8462,0x5840, +0x3B7C,0x0000,0x5844,0x4256,0x3932,0x5832,0x3F35,0x0000, +0x0000,0x0000,0x0000,0x5858,0x0000,0x4A69,0x0000,0x0000, +0x584E,0x584F,0x5850,0x0000,0x0000,0x5857,0x0000,0x5856, +0x8463,0x0000,0x4B7D,0x3437,0x0000,0x5854,0x0000,0x3745, +0x3334,0x0000,0x0000,0x5851,0x0000,0x0000,0x4E38,0x5853, +0x3056,0x5855,0x0000,0x584C,0x5852,0x5859,0x3744,0x584D, +0x0000,0x0000,0x0000,0x0000,0x8464,0x0000,0x4D5D,0x0000, +0x0000,0x0000,0x4D2B,0x0000,0x0000,0x0000,0x0000,0x585C, +0x0000,0x0000,0x5860,0x0000,0x0000,0x745D,0x417E,0x0000, +0x4E79,0x5861,0x8466,0x8467,0x585E,0x0000,0x585B,0x8468, +0x8469,0x585A,0x585F,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x4A30,0x846A,0x0000,0x4634, +0x846B,0x3746,0x0000,0x5862,0x585D,0x846C,0x5863,0x0000, +0x0000,0x0000,0x377B,0x0000,0x0000,0x0000,0x3231,0x0000, +0x0000,0x7460,0x586B,0x0000,0x745F,0x0000,0x3438,0x0000, +0x0000,0x0000,0x0000,0x5869,0x0000,0x0000,0x586A,0x3A29, +0x5868,0x5866,0x5865,0x586C,0x5864,0x586E,0x0000,0x0000, +0x327B,0x0000,0x0000,0x0000,0x0000,0x846E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x846F,0x0000,0x8470, +0x0000,0x0000,0x0000,0x5870,0x0000,0x0000,0x586F,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4428,0x0000,0x5873,0x8471,0x5871,0x5867, +0x377C,0x0000,0x5872,0x0000,0x5876,0x5875,0x5877,0x5874, + +/* 6200h */ +0x5878,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5879,0x587A,0x4A6A,0x0000,0x587C,0x587B,0x3D3F,0x0000, +0x402E,0x3266,0x327C,0x0000,0x587D,0x8473,0x303F,0x0000, +0x0000,0x0000,0x404C,0x587E,0x0000,0x6C43,0x5921,0x3761, +0x0000,0x5922,0x7462,0x8474,0x0000,0x0000,0x406F,0x0000, +0x0000,0x8475,0x5923,0x0000,0x0000,0x0000,0x5924,0x353A, +0x5925,0x0000,0x5926,0x5927,0x4257,0x0000,0x0000,0x0000, +0x384D,0x0000,0x0000,0x4C61,0x0000,0x0000,0x7463,0x4B3C, +0x3D6A,0x5928,0x0000,0x7464,0x0000,0x0000,0x8476,0x4070, +0x6E3D,0x4862,0x0000,0x3C6A,0x8477,0x3A4D,0x5929,0x0000, +0x0000,0x8478,0x8479,0x4247,0x0000,0x4A27,0x7465,0x0000, +0x4271,0x0000,0x7466,0x592C,0x0000,0x0000,0x592A,0x0000, +0x592D,0x847A,0x0000,0x592B,0x847B,0x0000,0x0000,0x0000, +0x592E,0x0000,0x0000,0x0000,0x0000,0x847D,0x4A31,0x7467, +0x0000,0x3037,0x0000,0x847E,0x0000,0x0000,0x495E,0x0000, +0x0000,0x4863,0x0000,0x847C,0x592F,0x0000,0x5932,0x3E35, +0x353B,0x0000,0x5930,0x5937,0x3E36,0x7468,0x0000,0x0000, +0x0000,0x5931,0x4744,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4D5E,0x5933,0x5934,0x5938,0x456A,0x5935,0x3933, +0x405E,0x8521,0x0000,0x5946,0x4834,0x0000,0x4272,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8522,0x0000, +0x0000,0x0000,0x0000,0x4864,0x5A2D,0x0000,0x0000,0x0000, +0x0000,0x4A7A,0x0000,0x0000,0x0000,0x4471,0x0000,0x0000, +0x0000,0x4B75,0x0000,0x593B,0x3221,0x436A,0x0000,0x0000, +0x0000,0x0000,0x5944,0x0000,0x7469,0x4334,0x593E,0x5945, +0x5940,0x5947,0x5943,0x0000,0x5942,0x476F,0x0000,0x593C, +0x327D,0x593A,0x3571,0x4273,0x5936,0x8523,0x746A,0x5939, +0x3934,0x405B,0x0000,0x3E37,0x5941,0x4752,0x0000,0x0000, +0x3572,0x3348,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x3367,0x3F21,0x5949,0x594E, +0x0000,0x594A,0x0000,0x377D,0x0000,0x594F,0x3B22,0x3969, +0x0000,0x0000,0x0000,0x0000,0x746B,0x8525,0x3D26,0x593D, + +/* 6300h */ +0x0000,0x3B7D,0x594C,0x8526,0x0000,0x0000,0x0000,0x3B58, +0x594D,0x3044,0x746C,0x0000,0x5948,0x8527,0x0000,0x0000, +0x8528,0x4429,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x746D,0x3573,0x0000,0x0000,0x0000,0x0000,0x0000,0x3634, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x594B, +0x3027,0x0000,0x0000,0x3A43,0x0000,0x0000,0x0000,0x3F36, +0x0000,0x0000,0x852B,0x0000,0x0000,0x852C,0x0000,0x0000, +0x0000,0x746E,0x4472,0x852D,0x852E,0x4854,0x5951,0x415E, +0x0000,0x852F,0x0000,0x746F,0x8530,0x0000,0x0000,0x0000, +0x0000,0x422A,0x0000,0x0000,0x3B2B,0x5952,0x8531,0x5954, +0x5950,0x0000,0x0000,0x0000,0x0000,0x4A61,0x0000,0x443D, +0x0000,0x8533,0x0000,0x0000,0x415C,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7470,0x0000,0x4A7B, +0x3C4E,0x5960,0x0000,0x595F,0x8536,0x0000,0x3F78,0x0000, +0x0000,0x0000,0x377E,0x0000,0x0000,0x0000,0x5959,0x3E39, +0x0000,0x0000,0x4668,0x4731,0x7471,0x0000,0x0000,0x0000, +0x5957,0x0000,0x0000,0x415D,0x8537,0x0000,0x0000,0x0000, +0x3C78,0x595C,0x0000,0x0000,0x3E38,0x0000,0x5956,0x595B, +0x0000,0x0000,0x4753,0x0000,0x853A,0x0000,0x5955,0x0000, +0x3721,0x8538,0x0000,0x335D,0x0000,0x0000,0x0000,0x595D, +0x4E2B,0x3A4E,0x4335,0x595A,0x0000,0x405C,0x0000,0x3935, +0x3F64,0x3166,0x413C,0x5958,0x3545,0x0000,0x0000,0x0000, +0x0000,0x0000,0x3747,0x0000,0x444F,0x595E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x415F,0x0000,0x853B,0x5961,0x0000, +0x5963,0x0000,0x0000,0x4237,0x5969,0x0000,0x5964,0x0000, +0x0000,0x5966,0x0000,0x0000,0x0000,0x0000,0x0000,0x4941, +0x4473,0x0000,0x5967,0x0000,0x853D,0x853E,0x4D2C,0x0000, +0x0000,0x0000,0x4D48,0x3439,0x853F,0x0000,0x0000,0x0000, +0x8540,0x302E,0x0000,0x5965,0x0000,0x7472,0x0000,0x0000, +0x0000,0x5962,0x0000,0x8541,0x8542,0x7473,0x3478,0x0000, +0x0000,0x0000,0x8543,0x0000,0x3167,0x7474,0x5968,0x853C, +0x0000,0x0000,0x4D49,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 6400h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x596C,0x0000, +0x0000,0x8544,0x0000,0x0000,0x0000,0x423B,0x0000,0x5973, +0x7475,0x0000,0x0000,0x596D,0x7476,0x0000,0x596A,0x5971, +0x0000,0x0000,0x0000,0x0000,0x5953,0x0000,0x8545,0x0000, +0x0000,0x0000,0x7477,0x0000,0x0000,0x8546,0x596E,0x0000, +0x5972,0x8547,0x0000,0x0000,0x4842,0x456B,0x0000,0x8548, +0x0000,0x0000,0x0000,0x0000,0x596B,0x0000,0x596F,0x0000, +0x0000,0x0000,0x3748,0x0000,0x0000,0x0000,0x3A71,0x0000, +0x0000,0x0000,0x405D,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5977,0x0000, +0x0000,0x7479,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4526,0x0000,0x8549,0x854A,0x0000,0x854B,0x0000,0x0000, +0x747A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5974, +0x0000,0x4B60,0x0000,0x0000,0x0000,0x747B,0x0000,0x5975, +0x0000,0x0000,0x0000,0x854C,0x0000,0x0000,0x5976,0x0000, +0x4C4E,0x7478,0x4022,0x0000,0x0000,0x854D,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3762,0x0000,0x0000,0x0000,0x854E, +0x597D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x854F,0x3B35,0x597A,0x0000,0x5979,0x0000,0x0000, +0x0000,0x0000,0x4732,0x0000,0x0000,0x8550,0x4635,0x8551, +0x0000,0x0000,0x0000,0x0000,0x4531,0x597B,0x0000,0x0000, +0x0000,0x597C,0x0000,0x496F,0x0000,0x4745,0x3B23,0x0000, +0x4071,0x0000,0x4B50,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3349,0x0000,0x5A25,0x597E,0x0000,0x747D,0x747E, +0x0000,0x4D4A,0x5A27,0x0000,0x7521,0x5A23,0x0000,0x5A24, +0x0000,0x0000,0x7522,0x8552,0x8553,0x4160,0x747C,0x0000, +0x7523,0x0000,0x5A22,0x0000,0x593F,0x8554,0x0000,0x8555, +0x5A26,0x0000,0x5A21,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5A2B,0x5A2C,0x4527,0x5A2E,0x8557,0x8558,0x3B24,0x5A29, +0x0000,0x0000,0x0000,0x0000,0x353C,0x0000,0x0000,0x5A2F, +0x0000,0x5A28,0x5A33,0x0000,0x5A32,0x0000,0x5A31,0x7524, +0x0000,0x0000,0x5A34,0x7525,0x0000,0x5A36,0x3E71,0x8559, + +/* 6500h */ +0x5A35,0x0000,0x0000,0x0000,0x855A,0x5A39,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x855C, +0x0000,0x0000,0x0000,0x0000,0x855D,0x0000,0x855E,0x0000, +0x5A37,0x0000,0x0000,0x0000,0x5A38,0x5970,0x8560,0x0000, +0x0000,0x0000,0x7526,0x5A3B,0x5A3A,0x0000,0x0000,0x0000, +0x0000,0x7527,0x5978,0x5A3C,0x5A30,0x0000,0x0000,0x3B59, +0x0000,0x0000,0x8561,0x0000,0x5A3D,0x5A3E,0x5A40,0x5A3F, +0x5A41,0x327E,0x0000,0x3936,0x0000,0x0000,0x4A7C,0x402F, +0x0000,0x0000,0x0000,0x0000,0x8562,0x384E,0x0000,0x0000, +0x5A43,0x0000,0x0000,0x0000,0x0000,0x5A46,0x0000,0x4952, +0x0000,0x355F,0x0000,0x0000,0x8563,0x5A45,0x5A44,0x4754, +0x5A47,0x3635,0x0000,0x0000,0x0000,0x5A49,0x5A48,0x0000, +0x0000,0x0000,0x343A,0x3B36,0x0000,0x0000,0x4658,0x7529, +0x0000,0x0000,0x0000,0x8564,0x3749,0x0000,0x0000,0x0000, +0x3F74,0x0000,0x5A4A,0x0000,0x4030,0x4528,0x0000,0x495F, +0x5A4B,0x0000,0x8565,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x8566,0x5A4C,0x5A4D,0x8567,0x8568,0x0000,0x4A38, +0x555D,0x4046,0x8569,0x0000,0x494C,0x0000,0x3A58,0x0000, +0x4865,0x4843,0x0000,0x0000,0x0000,0x0000,0x0000,0x454D, +0x0000,0x4E41,0x0000,0x5A4F,0x3C50,0x752A,0x0000,0x5A50, +0x0000,0x3036,0x0000,0x0000,0x3654,0x404D,0x0000,0x4960, +0x0000,0x0000,0x0000,0x5A51,0x3B42,0x4347,0x0000,0x3B5B, +0x3F37,0x0000,0x856A,0x0000,0x0000,0x856B,0x0000,0x5A52, +0x856C,0x4A7D,0x0000,0x0000,0x3177,0x3B5C,0x0000,0x856D, +0x0000,0x5A55,0x856E,0x5A53,0x5A56,0x4E39,0x5A54,0x0000, +0x0000,0x856F,0x0000,0x407B,0x5A57,0x0000,0x0000,0x4232, +0x0000,0x0000,0x5A58,0x0000,0x8570,0x0000,0x0000,0x347A, +0x0000,0x5A5A,0x0000,0x5A59,0x0000,0x0000,0x0000,0x0000, +0x5A5B,0x5A5C,0x347B,0x0000,0x0000,0x467C,0x4336,0x356C, +0x3B5D,0x4161,0x0000,0x0000,0x3D5C,0x3030,0x0000,0x0000, +0x0000,0x5A5D,0x8572,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x8573,0x3222,0x5A61,0x8574,0x0000,0x0000,0x0000, + +/* 6600h */ +0x752C,0x0000,0x3937,0x5A60,0x8575,0x0000,0x3A2B,0x3E3A, +0x8576,0x752D,0x5A5F,0x0000,0x3E3B,0x0000,0x4C40,0x3A2A, +0x0000,0x0000,0x0000,0x3057,0x404E,0x752E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x5A66,0x0000,0x752F,0x4031, +0x3147,0x8577,0x7531,0x0000,0x7532,0x3D55,0x0000,0x4B66, +0x3A72,0x0000,0x8578,0x7533,0x0000,0x3E3C,0x0000,0x4027, +0x7534,0x7535,0x0000,0x7536,0x5A65,0x5A63,0x5A64,0x0000, +0x0000,0x0000,0x7530,0x0000,0x436B,0x0000,0x0000,0x5B26, +0x0000,0x5A6A,0x3B7E,0x3938,0x5A68,0x8579,0x0000,0x0000, +0x7538,0x5A69,0x0000,0x3F38,0x7539,0x0000,0x857B,0x5A67, +0x0000,0x857A,0x3B2F,0x0000,0x0000,0x0000,0x0000,0x857E, +0x0000,0x753B,0x753C,0x8621,0x0000,0x5A6C,0x5A6B,0x5A70, +0x0000,0x753D,0x5A71,0x8622,0x5A6D,0x753E,0x3322,0x5A6E, +0x5A6F,0x4855,0x8625,0x8626,0x8627,0x8628,0x4961,0x374A, +0x5A72,0x0000,0x0000,0x753F,0x4032,0x0000,0x3E3D,0x7540, +0x7541,0x0000,0x4352,0x8629,0x0000,0x0000,0x0000,0x0000, +0x862A,0x3647,0x0000,0x5A73,0x5A77,0x0000,0x0000,0x324B, +0x5A74,0x5A76,0x0000,0x0000,0x0000,0x7542,0x5A75,0x0000, +0x862B,0x3D6B,0x862C,0x0000,0x0000,0x0000,0x4348,0x3045, +0x5A78,0x862D,0x0000,0x0000,0x0000,0x5A79,0x0000,0x0000, +0x7544,0x0000,0x442A,0x0000,0x0000,0x0000,0x4E71,0x0000, +0x0000,0x0000,0x0000,0x3B43,0x0000,0x862F,0x4A6B,0x0000, +0x0000,0x8630,0x7545,0x0000,0x4B3D,0x8631,0x0000,0x0000, +0x5B22,0x5A7B,0x0000,0x7546,0x5A7E,0x0000,0x5A7D,0x8633, +0x0000,0x5A7A,0x0000,0x0000,0x5B21,0x0000,0x7547,0x465E, +0x7548,0x5A7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5B23,0x0000, +0x0000,0x3D6C,0x5B24,0x754A,0x4D4B,0x4778,0x0000,0x0000, +0x5B25,0x0000,0x0000,0x0000,0x0000,0x0000,0x5B27,0x0000, +0x754B,0x5B28,0x0000,0x0000,0x8635,0x0000,0x0000,0x0000, +0x5B29,0x0000,0x364A,0x3148,0x3939,0x5B2A,0x0000,0x5B2B, +0x3D71,0x4162,0x754C,0x7537,0x5258,0x413E,0x413D,0x4258, + +/* 6700h */ +0x3A47,0x8637,0x0000,0x5072,0x0000,0x8638,0x0000,0x0000, +0x376E,0x4D2D,0x0000,0x4A7E,0x0000,0x497E,0x0000,0x5B2C, +0x0000,0x0000,0x8639,0x754D,0x3A73,0x443F,0x5B2D,0x4F2F, +0x0000,0x863B,0x0000,0x4B3E,0x0000,0x442B,0x5B2E,0x347C, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5B2F,0x5B30, +0x4C5A,0x0000,0x4C24,0x4B76,0x4B5C,0x3B25,0x5B32,0x0000, +0x0000,0x3C6B,0x0000,0x754F,0x4B51,0x0000,0x5B34,0x5B37, +0x5B36,0x0000,0x3479,0x0000,0x0000,0x3560,0x0000,0x5B33, +0x0000,0x5B35,0x0000,0x0000,0x0000,0x0000,0x5B38,0x7551, +0x7552,0x3F79,0x0000,0x0000,0x863E,0x863F,0x4D7B,0x3049, +0x3A60,0x423C,0x0000,0x3C5D,0x8640,0x0000,0x3E73,0x0000, +0x0000,0x5B3B,0x0000,0x0000,0x454E,0x8641,0x5B39,0x422B, +0x5B3A,0x3E72,0x4C5D,0x5B3C,0x5B3D,0x4D68,0x7550,0x0000, +0x0000,0x0000,0x5B42,0x0000,0x0000,0x393A,0x0000,0x4755, +0x5B3F,0x456C,0x5A5E,0x5A62,0x8645,0x354F,0x8646,0x4747, +0x0000,0x0000,0x0000,0x7553,0x5B41,0x0000,0x3E3E,0x4844, +0x0000,0x7554,0x0000,0x0000,0x0000,0x5B47,0x0000,0x487A, +0x0000,0x5B3E,0x0000,0x5B44,0x5B43,0x0000,0x0000,0x0000, +0x404F,0x0000,0x8648,0x7555,0x0000,0x4B6D,0x0000,0x4E53, +0x7556,0x0000,0x4B67,0x7557,0x324C,0x3B5E,0x0000,0x0000, +0x4F48,0x5B46,0x3F75,0x0000,0x0000,0x0000,0x5B45,0x0000, +0x0000,0x5B40,0x0000,0x0000,0x0000,0x0000,0x0000,0x384F, +0x864C,0x0000,0x864D,0x5B4C,0x5B4A,0x0000,0x324D,0x5B48, +0x5B4E,0x5B54,0x0000,0x7558,0x0000,0x0000,0x0000,0x0000, +0x755A,0x4248,0x0000,0x864E,0x4A41,0x0000,0x5B56,0x0000, +0x864F,0x0000,0x4922,0x0000,0x0000,0x0000,0x5B55,0x4770, +0x4B3F,0x343B,0x8650,0x4077,0x3D40,0x0000,0x0000,0x755B, +0x4453,0x8651,0x4D2E,0x8652,0x0000,0x5B51,0x5B50,0x0000, +0x0000,0x0000,0x5B52,0x0000,0x5B4F,0x0000,0x0000,0x5B57, +0x0000,0x5B4D,0x0000,0x0000,0x5B4B,0x0000,0x5B53,0x5B49, +0x8653,0x436C,0x0000,0x4C78,0x3C46,0x3A74,0x0000,0x8654, +0x0000,0x7559,0x0000,0x3A3A,0x755C,0x0000,0x4B6F,0x3341, + +/* 6800h */ +0x0000,0x755D,0x444E,0x464A,0x3149,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x864B,0x0000,0x0000,0x4072,0x0000,0x0000,0x4034,0x372A, +0x8658,0x0000,0x0000,0x0000,0x0000,0x755F,0x5B59,0x8659, +0x0000,0x393B,0x337C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x5B5B,0x3374,0x5B61,0x7560,0x865A,0x0000,0x0000, +0x0000,0x7561,0x5B5E,0x865C,0x4073,0x0000,0x0000,0x0000, +0x334B,0x3A2C,0x0000,0x865D,0x334A,0x3A4F,0x865E,0x0000, +0x5B5C,0x3765,0x374B,0x456D,0x865F,0x8660,0x5B5A,0x0000, +0x3046,0x8661,0x0000,0x0000,0x8662,0x5B5D,0x5B5F,0x0000, +0x364D,0x372C,0x755E,0x343C,0x354B,0x8663,0x0000,0x8664, +0x0000,0x5B62,0x0000,0x7562,0x3A79,0x4B71,0x0000,0x3B37, +0x0000,0x0000,0x0000,0x5B63,0x0000,0x0000,0x0000,0x4930, +0x0000,0x0000,0x0000,0x8666,0x0000,0x0000,0x8667,0x0000, +0x0000,0x0000,0x7563,0x0000,0x5B6F,0x7564,0x3233,0x5B64, +0x0000,0x0000,0x8668,0x0000,0x8669,0x0000,0x5B75,0x5B65, +0x0000,0x4E42,0x866A,0x5B6C,0x0000,0x475F,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x5B74,0x0000,0x5B67, +0x866B,0x0000,0x0000,0x3034,0x5B69,0x0000,0x866C,0x393C, +0x866E,0x866F,0x8670,0x5B6B,0x8671,0x5B6A,0x0000,0x5B66, +0x5B71,0x0000,0x3E3F,0x7566,0x0000,0x7567,0x546D,0x3868, +0x4D7C,0x0000,0x8672,0x8673,0x0000,0x5B68,0x0000,0x4474, +0x3323,0x3A2D,0x7568,0x5B60,0x8674,0x5B70,0x3361,0x0000, +0x0000,0x5B6E,0x5B72,0x8675,0x456E,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x867A,0x347E,0x867B,0x5C32,0x0000, +0x7569,0x4C49,0x5B77,0x347D,0x867C,0x5B7E,0x0000,0x867D, +0x756A,0x0000,0x4B40,0x0000,0x5C21,0x5C23,0x867E,0x5C27, +0x5B79,0x8721,0x432A,0x0000,0x0000,0x0000,0x0000,0x456F, +0x5C2B,0x5B7C,0x0000,0x5C28,0x8722,0x8723,0x0000,0x5C22, +0x756B,0x0000,0x0000,0x0000,0x8724,0x756C,0x3F39,0x5C2C, +0x756D,0x756E,0x4033,0x0000,0x0000,0x0000,0x0000,0x8725, +0x0000,0x5C2A,0x343D,0x8676,0x756F,0x0000,0x0000,0x0000, + +/* 6900h */ +0x4F50,0x5B76,0x0000,0x8726,0x5C26,0x3058,0x0000,0x8727, +0x5B78,0x0000,0x7570,0x4C3A,0x5B7D,0x3F22,0x4447,0x5B73, +0x0000,0x0000,0x5C25,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3F7A,0x5C2F,0x3371,0x3821,0x0000,0x0000,0x0000, +0x0000,0x5C31,0x5B7A,0x5C30,0x0000,0x5C29,0x5B7B,0x0000, +0x5C2D,0x0000,0x5C2E,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5C3F,0x0000,0x0000,0x0000,0x464E,0x7573,0x5C24,0x0000, +0x0000,0x5C3B,0x0000,0x872B,0x0000,0x5C3D,0x0000,0x4458, +0x0000,0x0000,0x7574,0x0000,0x0000,0x0000,0x872D,0x0000, +0x0000,0x7571,0x4D4C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x4976,0x5C38,0x424A,0x0000,0x7575, +0x0000,0x5C3E,0x413F,0x0000,0x5C35,0x5C42,0x5C41,0x0000, +0x466F,0x5C40,0x466A,0x7576,0x7577,0x0000,0x0000,0x0000, +0x7578,0x872E,0x5C44,0x5C37,0x872F,0x3648,0x5C3A,0x3D5D, +0x0000,0x0000,0x8730,0x4760,0x5C3C,0x364B,0x0000,0x5C34, +0x5C36,0x5C33,0x8731,0x0000,0x4F30,0x335A,0x5C39,0x8732, +0x7579,0x5C43,0x3335,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x3A67,0x0000,0x0000,0x0000,0x315D,0x0000, +0x0000,0x5C54,0x8733,0x0000,0x4F31,0x5C57,0x8735,0x0000, +0x8736,0x0000,0x0000,0x3F3A,0x5C56,0x0000,0x0000,0x0000, +0x5C55,0x0000,0x0000,0x0000,0x0000,0x757B,0x8737,0x5C52, +0x0000,0x0000,0x0000,0x0000,0x0000,0x757C,0x5C46,0x0000, +0x8738,0x5C63,0x5C45,0x0000,0x5C58,0x0000,0x0000,0x8739, +0x0000,0x0000,0x873A,0x5C50,0x873B,0x0000,0x5C4B,0x5C48, +0x873C,0x5C49,0x0000,0x5C51,0x0000,0x0000,0x0000,0x7422, +0x0000,0x0000,0x5C4E,0x393D,0x4448,0x4164,0x5C4C,0x757D, +0x5C47,0x873D,0x0000,0x5C4A,0x0000,0x0000,0x873E,0x0000, +0x4D4D,0x4B6A,0x0000,0x0000,0x0000,0x5C4F,0x5C59,0x0000, +0x0000,0x0000,0x7622,0x8744,0x0000,0x0000,0x0000,0x5C61, +0x5C5A,0x7623,0x7624,0x5C67,0x0000,0x5C65,0x8745,0x8746, +0x0000,0x0000,0x5C60,0x8747,0x8749,0x7625,0x7626,0x0000, +0x0000,0x5C5F,0x0000,0x4450,0x0000,0x4165,0x874A,0x5C5D, + +/* 6A00h */ +0x0000,0x0000,0x5C5B,0x0000,0x0000,0x5C62,0x0000,0x0000, +0x0000,0x0000,0x5C68,0x4875,0x5C6E,0x0000,0x0000,0x7627, +0x0000,0x874B,0x5C69,0x5C6C,0x5C66,0x7628,0x0000,0x4374, +0x0000,0x4938,0x874C,0x5C5C,0x0000,0x874D,0x5C64,0x3E40, +0x0000,0x4C4F,0x5C78,0x5C6B,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3822,0x3223,0x335F,0x0000,0x0000,0x5C53,0x0000, +0x8741,0x0000,0x874F,0x8750,0x8751,0x3E41,0x5C70,0x0000, +0x5C77,0x3C79,0x3372,0x762A,0x0000,0x432E,0x762B,0x8752, +0x0000,0x0000,0x0000,0x0000,0x5C6D,0x762C,0x8753,0x5C72, +0x5C76,0x8754,0x0000,0x3636,0x0000,0x0000,0x8756,0x0000, +0x762D,0x0000,0x8757,0x0000,0x0000,0x0000,0x762E,0x0000, +0x354C,0x5C74,0x0000,0x762F,0x0000,0x0000,0x0000,0x3521, +0x0000,0x464B,0x5C73,0x0000,0x8758,0x0000,0x5C75,0x0000, +0x0000,0x0000,0x0000,0x7630,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x5C6F,0x7631,0x0000,0x0000,0x0000,0x0000, +0x5C71,0x0000,0x8755,0x0000,0x0000,0x0000,0x875A,0x3360, +0x4349,0x0000,0x0000,0x875B,0x5C7C,0x0000,0x0000,0x0000, +0x0000,0x7633,0x0000,0x875C,0x0000,0x5C7A,0x3869,0x0000, +0x5C79,0x875E,0x0000,0x0000,0x7634,0x0000,0x0000,0x5D21, +0x0000,0x0000,0x0000,0x0000,0x5B58,0x7635,0x7636,0x875F, +0x5C7B,0x8760,0x5C7D,0x5C7E,0x0000,0x7637,0x0000,0x0000, +0x0000,0x0000,0x5D2C,0x8762,0x5D28,0x0000,0x5B6D,0x0000, +0x0000,0x0000,0x0000,0x5D27,0x0000,0x0000,0x0000,0x0000, +0x5D26,0x0000,0x0000,0x5D23,0x0000,0x8763,0x0000,0x0000, +0x0000,0x5C6A,0x5D25,0x5D24,0x0000,0x0000,0x8764,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8766,0x5D2A,0x0000,0x4F26,0x8765,0x0000,0x0000,0x0000, +0x0000,0x0000,0x5D2D,0x367B,0x8767,0x8768,0x5D29,0x5D2B, +0x0000,0x0000,0x0000,0x0000,0x7638,0x0000,0x0000,0x7639, +0x4827,0x0000,0x5D2E,0x0000,0x876B,0x0000,0x0000,0x0000, +0x0000,0x876C,0x876D,0x876E,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x5D32,0x5D2F,0x0000,0x876F,0x0000,0x0000, + +/* 6B00h */ +0x0000,0x0000,0x0000,0x0000,0x4D73,0x5D30,0x0000,0x0000, +0x0000,0x0000,0x5C5E,0x8771,0x0000,0x0000,0x0000,0x8772, +0x8773,0x8774,0x5D33,0x0000,0x0000,0x0000,0x5D34,0x8776, +0x0000,0x0000,0x0000,0x763C,0x0000,0x3135,0x763D,0x5D36, +0x3767,0x3C21,0x0000,0x3655,0x0000,0x0000,0x0000,0x3224, +0x0000,0x0000,0x0000,0x0000,0x763E,0x0000,0x0000,0x8778, +0x0000,0x0000,0x4D5F,0x0000,0x0000,0x763F,0x0000,0x5D38, +0x5D37,0x5D3A,0x353D,0x0000,0x0000,0x3656,0x343E,0x0000, +0x0000,0x0000,0x0000,0x5D3D,0x0000,0x0000,0x7640,0x5D3C, +0x0000,0x5D3E,0x8779,0x0000,0x324E,0x0000,0x4337,0x0000, +0x5D3F,0x0000,0x0000,0x343F,0x5D41,0x0000,0x7641,0x0000, +0x877A,0x5D40,0x0000,0x5D42,0x0000,0x0000,0x0000,0x5D43, +0x7642,0x5D44,0x3B5F,0x4035,0x3A21,0x7643,0x4970,0x7644, +0x0000,0x4A62,0x4F44,0x0000,0x877B,0x0000,0x0000,0x3B75, +0x0000,0x0000,0x0000,0x3A50,0x4E72,0x877C,0x0000,0x7645, +0x5D45,0x5D46,0x877D,0x3B60,0x0000,0x0000,0x0000,0x5D47, +0x5D48,0x877E,0x7646,0x5D4A,0x5D49,0x0000,0x4B58,0x0000, +0x0000,0x3D5E,0x3C6C,0x3B44,0x0000,0x5D4B,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x5D4D,0x3F23,0x0000, +0x5D4C,0x0000,0x0000,0x8821,0x0000,0x0000,0x5D4E,0x0000, +0x0000,0x0000,0x0000,0x0000,0x5D4F,0x0000,0x0000,0x0000, +0x0000,0x7647,0x5D50,0x5D51,0x0000,0x7648,0x8822,0x5D52, +0x0000,0x5D54,0x5D53,0x5D55,0x3225,0x434A,0x0000,0x5D56, +0x0000,0x0000,0x3B26,0x334C,0x5D57,0x8824,0x8825,0x4542, +0x544C,0x0000,0x0000,0x0000,0x0000,0x3523,0x5D58,0x8826, +0x8827,0x8828,0x0000,0x5D59,0x0000,0x4A6C,0x4B68,0x764A, +0x0000,0x0000,0x4647,0x5D5A,0x4866,0x0000,0x764B,0x764C, +0x487B,0x0000,0x8829,0x4C53,0x0000,0x0000,0x0000,0x5D5B, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x882A,0x882B, +0x0000,0x0000,0x0000,0x5D5D,0x5D5C,0x0000,0x882C,0x5D5F, +0x0000,0x882D,0x0000,0x5D5E,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x764D, + +/* 6C00h */ +0x0000,0x0000,0x882E,0x0000,0x0000,0x764E,0x0000,0x0000, +0x5D61,0x0000,0x882F,0x0000,0x0000,0x0000,0x8830,0x3B61, +0x764F,0x4C31,0x0000,0x5D62,0x5D63,0x0000,0x0000,0x3524, +0x0000,0x0000,0x0000,0x5D64,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x5D66,0x5D65,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7650,0x3F65,0x8831,0x8832,0x4939, +0x314A,0x0000,0x8833,0x0000,0x0000,0x0000,0x4845,0x8835, +0x4475,0x3D41,0x3561,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x8836,0x4846,0x0000, +0x3C2E,0x0000,0x0000,0x0000,0x0000,0x5D68,0x0000,0x3440, +0x0000,0x7651,0x3178,0x8837,0x7652,0x4672,0x5D67,0x393E, +0x4353,0x0000,0x5D69,0x0000,0x0000,0x0000,0x0000,0x884F, +0x5D71,0x0000,0x5D6A,0x0000,0x0000,0x8838,0x0000,0x0000, +0x4241,0x0000,0x3562,0x5D72,0x7654,0x0000,0x7655,0x0000, +0x0000,0x0000,0x3768,0x0000,0x0000,0x3525,0x5D70,0x0000, +0x0000,0x5D6E,0x5D6B,0x4D60,0x8839,0x7656,0x7657,0x0000, +0x4440,0x883A,0x0000,0x0000,0x4659,0x5D6C,0x0000,0x0000, +0x5D74,0x0000,0x5D73,0x3723,0x883C,0x883D,0x322D,0x883E, +0x7658,0x3A3B,0x5D6D,0x5D6F,0x7659,0x0000,0x0000,0x0000, +0x0000,0x4B57,0x4274,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7653,0x4B77,0x0000,0x883F,0x5D7C,0x0000, +0x0000,0x5D7D,0x0000,0x324F,0x0000,0x0000,0x0000,0x0000, +0x4A28,0x4C7D,0x5E21,0x3C23,0x3E42,0x5D78,0x5D7E,0x3168, +0x0000,0x3637,0x8840,0x0000,0x5D75,0x5D7A,0x765B,0x0000, +0x0000,0x4074,0x4771,0x0000,0x4867,0x0000,0x0000,0x0000, +0x8841,0x0000,0x0000,0x5D77,0x765C,0x4B21,0x8843,0x5D79, +0x0000,0x5E24,0x8844,0x5E22,0x8845,0x5D7B,0x0000,0x0000, +0x765D,0x4B22,0x4748,0x3563,0x0000,0x4525,0x0000,0x0000, +0x436D,0x8846,0x5E25,0x765E,0x8847,0x8848,0x765F,0x5E23, +0x4259,0x5D76,0x0000,0x314B,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x765A,0x0000,0x0000,0x0000,0x0000, + +/* 6D00h */ +0x884A,0x0000,0x0000,0x0000,0x7661,0x0000,0x0000,0x0000, +0x0000,0x0000,0x884B,0x4D4E,0x5E30,0x0000,0x7662,0x0000, +0x0000,0x0000,0x5E2F,0x0000,0x0000,0x0000,0x0000,0x4076, +0x0000,0x5E2C,0x0000,0x4D6C,0x0000,0x0000,0x4636,0x5E26, +0x0000,0x0000,0x0000,0x0000,0x884C,0x4445,0x884D,0x884E, +0x0000,0x314C,0x393F,0x5E29,0x0000,0x0000,0x7663,0x8850, +0x0000,0x7664,0x3D27,0x5E2E,0x8865,0x5E2D,0x5E28,0x0000, +0x5E2B,0x7665,0x0000,0x3368,0x8851,0x5E2A,0x4749,0x7666, +0x0000,0x4E2E,0x0000,0x0000,0x3E74,0x4075,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7667,0x5E36,0x5E34,0x8852,0x494D,0x0000,0x8853,0x0000, +0x8854,0x0000,0x0000,0x5E31,0x5E33,0x7668,0x313A,0x0000, +0x0000,0x3940,0x4F32,0x0000,0x333D,0x0000,0x4962,0x0000, +0x8855,0x0000,0x0000,0x0000,0x4D61,0x0000,0x0000,0x3324, +0x3F3B,0x5E35,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8856,0x8857,0x766A,0x0000,0x0000,0x5E3A,0x0000,0x766B, +0x3E43,0x766C,0x8858,0x0000,0x4D30,0x8859,0x5E37,0x0000, +0x0000,0x885A,0x0000,0x5E32,0x766D,0x5E38,0x0000,0x0000, +0x885B,0x4E5E,0x0000,0x4573,0x4642,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x766E,0x8861,0x766F,0x0000,0x8862,0x3336, +0x0000,0x0000,0x3155,0x0000,0x8863,0x5E3E,0x0000,0x0000, +0x5E41,0x0000,0x0000,0x0000,0x4E43,0x0000,0x0000,0x7670, +0x4D64,0x0000,0x8864,0x0000,0x7671,0x5E48,0x5E42,0x5E3F, +0x8866,0x0000,0x0000,0x4E54,0x5E45,0x0000,0x8867,0x8868, +0x8869,0x3D4A,0x5E47,0x0000,0x0000,0x5E4C,0x7672,0x0000, +0x4571,0x5E4A,0x7673,0x7674,0x0000,0x7675,0x5E44,0x886A, +0x0000,0x4338,0x0000,0x0000,0x5E4B,0x0000,0x5E40,0x0000, +0x5E46,0x886B,0x5E4D,0x307C,0x5E43,0x0000,0x5E4E,0x0000, +0x0000,0x3F3C,0x0000,0x3D5F,0x0000,0x4A25,0x886C,0x3A2E, +0x0000,0x5E3B,0x5E49,0x453A,0x7676,0x0000,0x0000,0x0000, + +/* 6E00h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x4036,0x0000,0x3369, +0x3A51,0x3E44,0x5E3D,0x3D42,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x374C,0x0000,0x5E3C,0x0000,0x885D, +0x0000,0x5E52,0x3D6D,0x383A,0x0000,0x5E61,0x886E,0x5E5B, +0x3574,0x454F,0x886F,0x5E56,0x5E5F,0x302F,0x3132,0x8870, +0x0000,0x3239,0x0000,0x5E58,0x422C,0x5E4F,0x5E51,0x3941, +0x0000,0x0000,0x8872,0x0000,0x7678,0x0000,0x886D,0x0000, +0x5E62,0x0000,0x5E5D,0x0000,0x8873,0x0000,0x5E55,0x0000, +0x0000,0x0000,0x0000,0x5E5C,0x7679,0x0000,0x0000,0x0000, +0x8874,0x8875,0x4C2B,0x8876,0x8877,0x5E5A,0x5E5E,0x8878, +0x0000,0x8879,0x0000,0x887A,0x887B,0x0000,0x3850,0x887C, +0x3E45,0x0000,0x0000,0x4339,0x767A,0x0000,0x767B,0x5E54, +0x0000,0x0000,0x0000,0x887D,0x0000,0x0000,0x0000,0x4D2F, +0x0000,0x0000,0x0000,0x5E57,0x0000,0x0000,0x5E50,0x4572, +0x0000,0x0000,0x5E53,0x0000,0x0000,0x0000,0x5E59,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4F51,0x3C3E, +0x4B7E,0x0000,0x5E63,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x482E,0x0000,0x0000,0x5E6F, +0x383B,0x0000,0x0000,0x8921,0x0000,0x0000,0x3D60,0x0000, +0x5E65,0x0000,0x0000,0x0000,0x4E2F,0x3942,0x0000,0x5E72, +0x0000,0x0000,0x306E,0x0000,0x0000,0x5E70,0x0000,0x8922, +0x0000,0x0000,0x5E64,0x767C,0x0000,0x0000,0x0000,0x5E6A, +0x0000,0x767D,0x5E6C,0x0000,0x8923,0x0000,0x4D4F,0x5E67, +0x0000,0x0000,0x452E,0x0000,0x0000,0x5E69,0x0000,0x8924, +0x0000,0x767E,0x5E71,0x8925,0x5E6B,0x4C47,0x0000,0x7721, +0x0000,0x5E66,0x8926,0x3C22,0x5E7E,0x0000,0x7722,0x0000, +0x0000,0x336A,0x0000,0x5E68,0x5E6D,0x5E6E,0x0000,0x0000, +0x0000,0x8927,0x0000,0x0000,0x0000,0x426C,0x425A,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x8929,0x5E76,0x0000,0x0000,0x5E7C, +0x0000,0x0000,0x5E7A,0x0000,0x4529,0x0000,0x0000,0x5F23, +0x5E77,0x892A,0x0000,0x892B,0x0000,0x0000,0x5E78,0x5E60, + +/* 6F00h */ +0x0000,0x3579,0x493A,0x0000,0x0000,0x0000,0x3C3F,0x0000, +0x0000,0x3977,0x892C,0x0000,0x892D,0x0000,0x0000,0x4F33, +0x7723,0x5E74,0x0000,0x5F22,0x3169,0x4166,0x0000,0x0000, +0x892E,0x0000,0x7724,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4779,0x0000,0x3441,0x4E7A,0x0000,0x892F,0x0000,0x0000, +0x0000,0x0000,0x7726,0x4C21,0x4452,0x0000,0x0000,0x7727, +0x0000,0x5E7B,0x5E7D,0x7728,0x0000,0x8928,0x8930,0x0000, +0x4132,0x0000,0x0000,0x0000,0x8931,0x0000,0x5F21,0x5E79, +0x0000,0x5E73,0x0000,0x0000,0x0000,0x3443,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x7729,0x8933,0x0000,0x3769,0x0000,0x0000,0x8934, +0x5F2F,0x772A,0x8935,0x5F2A,0x4078,0x0000,0x772B,0x3363, +0x8936,0x772C,0x772D,0x0000,0x3D61,0x0000,0x5F33,0x0000, +0x8937,0x0000,0x0000,0x0000,0x0000,0x5F2C,0x442C,0x5F29, +0x4459,0x0000,0x0000,0x0000,0x5F4C,0x0000,0x0000,0x0000, +0x5F26,0x0000,0x5F25,0x0000,0x5F2E,0x8939,0x772E,0x0000, +0x5F28,0x5F27,0x5F2D,0x0000,0x4021,0x0000,0x5F24,0x0000, +0x772F,0x0000,0x0000,0x0000,0x7730,0x7731,0x5F30,0x0000, +0x893A,0x5F31,0x0000,0x0000,0x7732,0x0000,0x893B,0x3442, +0x8938,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x893D, +0x7733,0x5F36,0x0000,0x5F35,0x5F37,0x893E,0x0000,0x7734, +0x0000,0x0000,0x5F3A,0x0000,0x0000,0x0000,0x0000,0x893F, +0x0000,0x4543,0x0000,0x5F34,0x0000,0x8941,0x7735,0x0000, +0x0000,0x5F38,0x0000,0x0000,0x7736,0x0000,0x893C,0x0000, +0x3763,0x4279,0x5F32,0x473B,0x0000,0x0000,0x5F39,0x7737, +0x8942,0x8943,0x7738,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x5F3E,0x5F3C,0x0000,0x0000, +0x5F3F,0x0000,0x8944,0x5F42,0x0000,0x0000,0x8945,0x5F3B, +0x396A,0x4728,0x0000,0x0000,0x5E39,0x0000,0x0000,0x0000, +0x0000,0x8946,0x0000,0x4D74,0x5F3D,0x0000,0x5F41,0x4275, +0x773A,0x5F40,0x0000,0x5F2B,0x0000,0x773B,0x6F69,0x0000, +0x0000,0x7739,0x5F45,0x0000,0x8948,0x0000,0x5F49,0x0000, + +/* 7000h */ +0x8949,0x5F47,0x0000,0x0000,0x0000,0x773C,0x773D,0x894A, +0x0000,0x5F43,0x894B,0x5F44,0x0000,0x0000,0x0000,0x5F48, +0x0000,0x5F46,0x0000,0x0000,0x0000,0x494E,0x0000,0x0000, +0x5F4E,0x0000,0x5F4B,0x5F4A,0x0000,0x5F4D,0x4654,0x5F4F, +0x0000,0x0000,0x0000,0x894C,0x0000,0x0000,0x4375,0x426D, +0x773E,0x0000,0x0000,0x0000,0x4025,0x0000,0x0000,0x0000, +0x5F50,0x0000,0x5F52,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x894E,0x894F,0x0000,0x8950,0x0000,0x5F51,0x0000, +0x0000,0x0000,0x0000,0x8951,0x0000,0x0000,0x0000,0x8952, +0x0000,0x0000,0x773F,0x8953,0x5E75,0x0000,0x7742,0x0000, +0x0000,0x5F53,0x0000,0x0000,0x8955,0x0000,0x0000,0x0000, +0x4667,0x0000,0x0000,0x0000,0x0000,0x7740,0x7741,0x0000, +0x0000,0x0000,0x0000,0x5F54,0x7743,0x8956,0x0000,0x0000, +0x0000,0x8957,0x0000,0x3250,0x8958,0x0000,0x8959,0x4574, +0x3325,0x0000,0x0000,0x0000,0x0000,0x7744,0x895A,0x0000, +0x3564,0x0000,0x0000,0x0000,0x3C5E,0x3A52,0x895B,0x0000, +0x0000,0x895C,0x0000,0x0000,0x0000,0x7745,0x895D,0x0000, +0x0000,0x4F27,0x3F66,0x0000,0x0000,0x0000,0x316A,0x0000, +0x0000,0x0000,0x5F56,0x0000,0x0000,0x895E,0x0000,0x895F, +0x0000,0x5F55,0x0000,0x0000,0x0000,0x0000,0x0000,0x8962, +0x0000,0x0000,0x0000,0x0000,0x7746,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7747,0x5F59,0x433A,0x5F5C,0x5F57, +0x0000,0x8963,0x0000,0x5F5B,0x0000,0x0000,0x0000,0x7748, +0x5F5A,0x4540,0x3059,0x8960,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4E75,0x0000,0x8966,0x5F5E,0x0000,0x0000,0x0000,0x3128, +0x0000,0x8967,0x0000,0x8968,0x7749,0x0000,0x0000,0x0000, +0x774A,0x5F60,0x0000,0x0000,0x8969,0x5F5F,0x0000,0x5F5D, +0x0000,0x0000,0x0000,0x0000,0x774B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x8965,0x0000,0x0000,0x0000, +0x0000,0x5F58,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4B23,0x0000,0x0000,0x0000,0x5F62,0x0000,0x0000, + +/* 7100h */ +0x0000,0x0000,0x0000,0x896A,0x896B,0x0000,0x896C,0x896D, +0x896E,0x5F61,0x0000,0x0000,0x896F,0x0000,0x0000,0x774C, +0x0000,0x0000,0x0000,0x0000,0x316B,0x0000,0x0000,0x0000, +0x0000,0x5F64,0x4A32,0x0000,0x5F63,0x0000,0x774E,0x0000, +0x774F,0x4C35,0x0000,0x0000,0x0000,0x0000,0x3E47,0x0000, +0x0000,0x0000,0x0000,0x774D,0x0000,0x0000,0x7750,0x8971, +0x7751,0x8972,0x0000,0x0000,0x0000,0x0000,0x4133,0x0000, +0x0000,0x0000,0x0000,0x0000,0x3E46,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7752,0x7753, +0x0000,0x4E7B,0x8974,0x0000,0x5F6A,0x0000,0x4079,0x0000, +0x8973,0x7754,0x7756,0x8975,0x0000,0x5F66,0x5F6B,0x0000, +0x0000,0x316C,0x0000,0x0000,0x7757,0x0000,0x8976,0x0000, +0x7758,0x0000,0x5F69,0x0000,0x4761,0x5F65,0x5F68,0x3E48, +0x7759,0x4851,0x0000,0x0000,0x5F6C,0x0000,0x3C51,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x407A,0x0000,0x0000, +0x8979,0x0000,0x0000,0x0000,0x5F6F,0x775B,0x0000,0x775C, +0x5F67,0x0000,0x3727,0x0000,0x0000,0x0000,0x0000,0x5F6D, +0x0000,0x0000,0x775D,0x0000,0x4D50,0x5F70,0x8978,0x0000, +0x0000,0x7426,0x0000,0x897A,0x0000,0x0000,0x0000,0x3D4F, +0x897B,0x0000,0x897C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x5F71,0x0000,0x0000,0x0000,0x5F72,0x0000,0x897D,0x897E, +0x0000,0x472E,0x0000,0x8A21,0x0000,0x0000,0x0000,0x0000, +0x0000,0x5F74,0x775F,0x0000,0x0000,0x0000,0x5F75,0x0000, +0x0000,0x775E,0x0000,0x4733,0x7760,0x0000,0x0000,0x0000, +0x4575,0x5F77,0x0000,0x8A23,0x0000,0x0000,0x5F79,0x0000, +0x4E55,0x0000,0x5F76,0x8A24,0x5F78,0x316D,0x0000,0x5F73, +0x0000,0x8A25,0x0000,0x0000,0x8A26,0x0000,0x0000,0x535B, +0x5F7A,0x0000,0x0000,0x0000,0x0000,0x4167,0x3B38,0x5F7C, +0x0000,0x0000,0x0000,0x0000,0x5F7B,0x3F24,0x5259,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x5F7D,0x0000,0x0000, +0x0000,0x6021,0x0000,0x5F6E,0x5F7E,0x0000,0x7761,0x6022, + +/* 7200h */ +0x7762,0x0000,0x0000,0x0000,0x0000,0x0000,0x477A,0x8A27, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6023,0x0000,0x0000, +0x6024,0x0000,0x0000,0x0000,0x0000,0x7763,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6025,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6026,0x0000,0x445E,0x8A2A,0x6028,0x6027,0x0000,0x0000, +0x6029,0x0000,0x602A,0x0000,0x8A2B,0x3C5F,0x4963,0x0000, +0x8A2C,0x8A2D,0x4C6C,0x602B,0x602C,0x4156,0x3C24,0x602D, +0x602E,0x0000,0x8A2F,0x0000,0x0000,0x0000,0x602F,0x4A52, +0x4847,0x0000,0x0000,0x6030,0x4757,0x0000,0x0000,0x0000, +0x0000,0x0000,0x442D,0x8A30,0x0000,0x7764,0x7765,0x8A31, +0x6031,0x3267,0x0000,0x356D,0x0000,0x4C46,0x0000,0x4C36, +0x0000,0x3234,0x4F34,0x8A32,0x0000,0x0000,0x0000,0x4B52, +0x0000,0x4A2A,0x0000,0x0000,0x0000,0x0000,0x8A34,0x8A35, +0x0000,0x0000,0x4037,0x0000,0x6032,0x0000,0x0000,0x0000, +0x8A36,0x4643,0x0000,0x0000,0x0000,0x3823,0x6033,0x8A37, +0x3A54,0x6035,0x6034,0x0000,0x0000,0x0000,0x0000,0x6036, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7767,0x8A38,0x0000, +0x0000,0x0000,0x6037,0x0000,0x0000,0x0000,0x6038,0x0000, +0x0000,0x0000,0x0000,0x7768,0x0000,0x0000,0x0000,0x0000, +0x353E,0x0000,0x6039,0x0000,0x0000,0x0000,0x0000,0x603A, +0x0000,0x0000,0x0000,0x0000,0x3824,0x8A3A,0x8A3B,0x4848, +0x8A3C,0x8A3D,0x603C,0x0000,0x0000,0x0000,0x3E75,0x0000, +0x0000,0x603B,0x0000,0x0000,0x0000,0x0000,0x7769,0x0000, +0x776A,0x8A3E,0x3638,0x603D,0x603F,0x0000,0x603E,0x0000, +0x0000,0x0000,0x0000,0x0000,0x8A40,0x0000,0x6040,0x0000, +0x3851,0x0000,0x6041,0x0000,0x0000,0x0000,0x0000,0x3669, +0x0000,0x4140,0x0000,0x397D,0x0000,0x0000,0x0000,0x0000, +0x6043,0x6044,0x6042,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3C6D,0x0000,0x0000,0x4648,0x3639,0x0000,0x0000, +0x0000,0x0000,0x0000,0x8A43,0x0000,0x0000,0x0000,0x6046, +0x432C,0x6045,0x8A44,0x776B,0x4F35,0x4762,0x0000,0x0000, + +/* 7300h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8A45, +0x0000,0x0000,0x6049,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x8A46,0x0000,0x0000,0x0000,0x604B,0x6048, +0x8A47,0x8A48,0x0000,0x4C54,0x604A,0x604C,0x0000,0x4E44, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6050,0x0000,0x776D, +0x776E,0x604F,0x4376,0x472D,0x8A4B,0x0000,0x3825,0x604E, +0x0000,0x8A4C,0x0000,0x8A4D,0x604D,0x0000,0x4D31,0x4D32, +0x0000,0x8A4A,0x0000,0x0000,0x0000,0x8A4E,0x6051,0x316E, +0x0000,0x0000,0x0000,0x0000,0x3976,0x3B62,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6052,0x6053, +0x7770,0x0000,0x8A4F,0x0000,0x0000,0x0000,0x0000,0x6055, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3D43,0x0000,0x0000,0x7771,0x0000, +0x6057,0x0000,0x6056,0x8A51,0x8A52,0x0000,0x8A54,0x8A55, +0x6058,0x8A56,0x334D,0x0000,0x0000,0x605A,0x0000,0x8A57, +0x6059,0x0000,0x605C,0x605B,0x7772,0x0000,0x0000,0x0000, +0x0000,0x8A58,0x0000,0x0000,0x383C,0x8A59,0x0000,0x4E28, +0x0000,0x364C,0x8A5A,0x3226,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x8A5B,0x7773,0x366A,0x0000, +0x8A5C,0x0000,0x0000,0x0000,0x8A5D,0x0000,0x8A5E,0x7774, +0x7775,0x0000,0x7776,0x0000,0x0000,0x8A5F,0x7777,0x0000, +0x8A60,0x3461,0x0000,0x7778,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4E68,0x605E,0x0000,0x8A61,0x0000,0x8A62, +0x0000,0x8A63,0x0000,0x6060,0x8A64,0x0000,0x0000,0x8A65, +0x6061,0x0000,0x3251,0x0000,0x0000,0x8A66,0x0000,0x0000, +0x605D,0x7779,0x3B39,0x8A67,0x0000,0x4441,0x605F,0x777A, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x777B,0x0000, +0x0000,0x777C,0x0000,0x0000,0x0000,0x0000,0x6064,0x0000, +0x3C6E,0x8A68,0x0000,0x777D,0x0000,0x6062,0x0000,0x8A69, +0x0000,0x777E,0x373E,0x0000,0x0000,0x4849,0x6063,0x0000, +0x0000,0x607E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6069,0x8A6A,0x8A6C,0x0000,0x0000,0x0000,0x383D,0x0000, + +/* 7400h */ +0x0000,0x8A6D,0x0000,0x3565,0x0000,0x6066,0x4D7D,0x7821, +0x0000,0x4E30,0x7822,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x8A6B,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7823,0x7824,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4276,0x0000,0x8A6E,0x6068,0x7826,0x0000, +0x7827,0x0000,0x7828,0x7829,0x782A,0x0000,0x782B,0x782C, +0x782D,0x8A6F,0x606A,0x4E56,0x3657,0x487C,0x474A,0x0000, +0x0000,0x8A70,0x606B,0x0000,0x0000,0x0000,0x0000,0x606D, +0x8A72,0x6070,0x0000,0x8A73,0x782E,0x0000,0x782F,0x7830, +0x0000,0x0000,0x0000,0x7831,0x0000,0x8A74,0x0000,0x0000, +0x0000,0x0000,0x8A75,0x8A71,0x0000,0x606C,0x0000,0x7832, +0x0000,0x606F,0x386A,0x314D,0x6071,0x8A76,0x3F70,0x606E, +0x4E5C,0x0000,0x7833,0x6074,0x7424,0x0000,0x0000,0x0000, +0x0000,0x6072,0x6075,0x7834,0x0000,0x7835,0x0000,0x6067, +0x6073,0x8A77,0x0000,0x3A3C,0x0000,0x0000,0x6076,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6077,0x0000, +0x0000,0x8A78,0x0000,0x4D7E,0x0000,0x8A79,0x7836,0x7837, +0x8A7A,0x7838,0x0000,0x6078,0x0000,0x0000,0x0000,0x0000, +0x783D,0x0000,0x8A7C,0x0000,0x0000,0x0000,0x0000,0x8A7D, +0x7839,0x8A7E,0x0000,0x0000,0x783A,0x0000,0x6079,0x783B, +0x8B21,0x8B22,0x6065,0x783C,0x0000,0x8B23,0x783E,0x607A, +0x783F,0x7840,0x8B24,0x8B25,0x0000,0x0000,0x0000,0x0000, +0x3444,0x0000,0x0000,0x0000,0x0000,0x7841,0x0000,0x0000, +0x0000,0x8B26,0x8B28,0x8B27,0x0000,0x3C25,0x0000,0x7842, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7843,0x7844,0x607B,0x0000,0x0000,0x0000,0x0000,0x607C, +0x0000,0x0000,0x0000,0x0000,0x607D,0x0000,0x8B29,0x0000, +0x8B2A,0x0000,0x7845,0x0000,0x313B,0x0000,0x8B2B,0x0000, +0x6121,0x0000,0x493B,0x6122,0x0000,0x0000,0x3424,0x6123, +0x0000,0x6124,0x0000,0x8B2D,0x0000,0x0000,0x6125,0x8B2C, +0x6127,0x6128,0x6126,0x0000,0x0000,0x0000,0x4953,0x612A, +0x6129,0x0000,0x8B2F,0x0000,0x0000,0x0000,0x0000,0x7846, + +/* 7500h */ +0x0000,0x7847,0x0000,0x612C,0x612B,0x612D,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x612E,0x6130,0x612F,0x0000, +0x0000,0x3979,0x0000,0x6132,0x0000,0x6131,0x0000,0x7848, +0x3445,0x0000,0x3F53,0x0000,0x453C,0x0000,0x6133,0x4038, +0x8B31,0x0000,0x0000,0x3B3A,0x8B32,0x3179,0x6134,0x0000, +0x4D51,0x0000,0x8B33,0x4A63,0x6135,0x0000,0x0000,0x7849, +0x4544,0x4D33,0x3943,0x3F3D,0x0000,0x0000,0x0000,0x434B, +0x5234,0x0000,0x442E,0x3268,0x6136,0x8B36,0x8B37,0x0000, +0x8B38,0x0000,0x0000,0x0000,0x6137,0x0000,0x613C,0x0000, +0x8B39,0x613A,0x6139,0x5A42,0x3326,0x6138,0x8B3A,0x305A, +0x8B3B,0x482A,0x8B3C,0x0000,0x484A,0x0000,0x0000,0x0000, +0x0000,0x4E31,0x613D,0x613B,0x435C,0x4026,0x0000,0x0000, +0x482B,0x0000,0x492D,0x0000,0x613F,0x4E2C,0x374D,0x6140, +0x0000,0x613E,0x4856,0x6141,0x8B3D,0x6142,0x0000,0x784A, +0x305B,0x8B3F,0x8B3E,0x3E76,0x6147,0x0000,0x6144,0x466D, +0x6143,0x784B,0x8B40,0x0000,0x0000,0x8B41,0x8B42,0x3526, +0x0000,0x8B43,0x614A,0x0000,0x0000,0x0000,0x6145,0x6146, +0x0000,0x6149,0x6148,0x4925,0x8B45,0x0000,0x4142,0x4141, +0x0000,0x353F,0x784C,0x0000,0x614B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x614C,0x0000,0x0000,0x614D,0x0000,0x0000, +0x0000,0x0000,0x8B47,0x614F,0x0000,0x614E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3156,0x0000,0x0000,0x0000,0x0000, +0x8B49,0x6157,0x4868,0x6151,0x0000,0x6153,0x0000,0x8B4A, +0x6155,0x3F3E,0x0000,0x0000,0x6156,0x6154,0x3C40,0x8B4B, +0x8B4C,0x0000,0x6150,0x6152,0x0000,0x4942,0x8B4D,0x3E49, +0x0000,0x0000,0x6159,0x0000,0x0000,0x6158,0x784E,0x8B4E, +0x0000,0x0000,0x615A,0x8B4F,0x3C26,0x3A2F,0x0000,0x0000, +0x4577,0x615B,0x0000,0x444B,0x0000,0x8B50,0x615D,0x8B51, +0x8B52,0x0000,0x4E21,0x615C,0x784F,0x0000,0x0000,0x8B53, +0x0000,0x4169,0x0000,0x0000,0x8B54,0x0000,0x8B55,0x0000, +0x6162,0x8B56,0x6164,0x6165,0x4354,0x0000,0x0000,0x0000, +0x0000,0x8B57,0x6163,0x0000,0x6160,0x0000,0x615E,0x615F, + +/* 7600h */ +0x7850,0x6161,0x7851,0x8B58,0x0000,0x0000,0x0000,0x8B5A, +0x7852,0x6168,0x0000,0x6166,0x0000,0x6167,0x0000,0x8B5B, +0x0000,0x0000,0x0000,0x8B5E,0x0000,0x7853,0x7854,0x0000, +0x8B59,0x7855,0x0000,0x8B5F,0x8B60,0x0000,0x7856,0x6169, +0x616B,0x616C,0x616D,0x0000,0x616E,0x8B62,0x7E7D,0x616A, +0x8B63,0x0000,0x0000,0x0000,0x0000,0x7857,0x0000,0x0000, +0x6170,0x0000,0x0000,0x8B65,0x616F,0x7858,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6171,0x8B64,0x0000,0x0000,0x0000, +0x0000,0x8B68,0x4E45,0x7859,0x0000,0x0000,0x6174,0x6172, +0x6173,0x8B6A,0x0000,0x785A,0x3462,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4C7E,0x0000,0x0000,0x8B6B,0x4A4A,0x0000, +0x6176,0x0000,0x0000,0x0000,0x6175,0x0000,0x0000,0x0000, +0x0000,0x6177,0x6178,0x0000,0x785B,0x785C,0x0000,0x617C, +0x6179,0x617A,0x617B,0x0000,0x617D,0x785D,0x8B6D,0x785E, +0x617E,0x785F,0x6221,0x0000,0x0000,0x0000,0x6222,0x0000, +0x6223,0x0000,0x482F,0x4550,0x6224,0x4772,0x4934,0x0000, +0x6225,0x7860,0x0000,0x6226,0x452A,0x0000,0x3327,0x3944, +0x6227,0x0000,0x0000,0x6228,0x0000,0x0000,0x6229,0x0000, +0x3B29,0x0000,0x0000,0x622B,0x0000,0x8B6E,0x622A,0x0000, +0x0000,0x622C,0x622D,0x7861,0x8B6F,0x7862,0x7863,0x0000, +0x8B71,0x8B70,0x0000,0x0000,0x0000,0x0000,0x7864,0x8B72, +0x8B73,0x0000,0x7865,0x0000,0x0000,0x0000,0x4869,0x8B74, +0x622E,0x0000,0x0000,0x0000,0x622F,0x0000,0x7866,0x7369, +0x6230,0x6231,0x6232,0x0000,0x0000,0x0000,0x0000,0x3B2E, +0x0000,0x0000,0x6233,0x4756,0x0000,0x7867,0x4B5F,0x0000, +0x314E,0x8B76,0x3157,0x0000,0x7868,0x6234,0x7869,0x0000, +0x0000,0x0000,0x6236,0x0000,0x786A,0x0000,0x6235,0x4570, +0x0000,0x0000,0x0000,0x4039,0x5D39,0x0000,0x6237,0x4C41, +0x0000,0x6238,0x0000,0x3446,0x4857,0x6239,0x786B,0x623A, +0x8B78,0x0000,0x623B,0x0000,0x8B79,0x0000,0x4C5C,0x0000, +0x0000,0x786C,0x4C55,0x0000,0x443E,0x0000,0x0000,0x0000, +0x416A,0x0000,0x0000,0x623D,0x786D,0x0000,0x3D62,0x0000, + +/* 7700h */ +0x0000,0x3E4A,0x0000,0x0000,0x6240,0x0000,0x0000,0x623F, +0x623E,0x487D,0x786E,0x3447,0x3829,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8B7B, +0x0000,0x786F,0x8B7C,0x6246,0x0000,0x0000,0x6243,0x3F3F, +0x4C32,0x0000,0x0000,0x0000,0x6242,0x6244,0x6245,0x0000, +0x0000,0x6241,0x0000,0x0000,0x0000,0x8B7D,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x7870,0x8B7E,0x7871,0x6247, +0x6248,0x0000,0x442F,0x0000,0x3463,0x0000,0x0000,0x0000, +0x4365,0x0000,0x0000,0x0000,0x0000,0x0000,0x7872,0x6249, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7873,0x7874,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8C25,0x0000,0x624A,0x624D,0x7875,0x0000,0x0000,0x7876, +0x8C26,0x3F67,0x7877,0x4644,0x0000,0x624E,0x4B53,0x0000, +0x624B,0x0000,0x8C27,0x624C,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x8C29,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6251,0x7878,0x0000,0x8C2A,0x8C2B,0x6250,0x624F, +0x7879,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6253,0x0000,0x0000,0x6252,0x0000, +0x0000,0x6254,0x0000,0x0000,0x787A,0x0000,0x0000,0x0000, +0x0000,0x0000,0x8C2E,0x0000,0x0000,0x0000,0x6256,0x8C2F, +0x6255,0x0000,0x8C30,0x0000,0x8C31,0x4A4D,0x0000,0x0000, +0x0000,0x8C32,0x787B,0x0000,0x3D56,0x4E46,0x0000,0x0000, +0x6257,0x0000,0x0000,0x4637,0x0000,0x0000,0x6258,0x0000, +0x0000,0x6259,0x0000,0x625D,0x625B,0x625C,0x0000,0x625A, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x625E, +0x0000,0x0000,0x0000,0x0000,0x0000,0x625F,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6260, +0x0000,0x0000,0x6261,0x4C37,0x6262,0x0000,0x8C33,0x8C34, +0x787C,0x0000,0x4C70,0x6263,0x8C35,0x434E,0x8C36,0x476A, +0x0000,0x366B,0x8C37,0x0000,0x8C38,0x433B,0x6264,0x363A, +0x8C3A,0x0000,0x0000,0x4050,0x8C3B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x8C3C,0x6265,0x0000,0x0000,0x0000, + +/* 7800h */ +0x0000,0x0000,0x3A3D,0x0000,0x0000,0x8C3E,0x8C3F,0x0000, +0x0000,0x8C40,0x0000,0x0000,0x6266,0x8C41,0x0000,0x0000, +0x0000,0x0000,0x6267,0x0000,0x3826,0x3A55,0x0000,0x0000, +0x0000,0x8C42,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6269,0x8C43,0x0000,0x0000,0x0000,0x4556,0x3A56,0x354E, +0x0000,0x0000,0x0000,0x0000,0x8C44,0x787D,0x0000,0x0000, +0x0000,0x0000,0x4B24,0x0000,0x474B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x4557,0x0000,0x0000,0x0000,0x0000,0x395C, +0x0000,0x0000,0x0000,0x7921,0x0000,0x626B,0x0000,0x8C45, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7922,0x7923, +0x0000,0x7924,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x3E4B,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x8C46,0x0000,0x0000,0x0000, +0x7925,0x0000,0x8C47,0x4E32,0x3945,0x0000,0x7926,0x3827, +0x0000,0x0000,0x4823,0x0000,0x626D,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x626F,0x0000,0x0000,0x0000, +0x0000,0x386B,0x0000,0x0000,0x0000,0x0000,0x626E,0x4476, +0x0000,0x0000,0x8C49,0x0000,0x6271,0x3337,0x626C,0x0000, +0x0000,0x486A,0x0000,0x3130,0x8C4A,0x3A6C,0x0000,0x4F52, +0x0000,0x0000,0x6270,0x0000,0x0000,0x8C4C,0x8C4D,0x8C4E, +0x0000,0x0000,0x0000,0x6272,0x8C4B,0x0000,0x0000,0x4A4B, +0x0000,0x4059,0x6274,0x0000,0x0000,0x792A,0x0000,0x6275, +0x7928,0x0000,0x0000,0x0000,0x0000,0x6273,0x0000,0x0000, +0x0000,0x0000,0x334E,0x8C4F,0x627B,0x0000,0x627A,0x0000, +0x0000,0x3C27,0x0000,0x0000,0x0000,0x627C,0x6277,0x0000, +0x8C50,0x0000,0x627D,0x6278,0x8C51,0x0000,0x8C52,0x0000, +0x4858,0x6276,0x0000,0x0000,0x6279,0x8C53,0x0000,0x0000, +0x0000,0x0000,0x6322,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8C54,0x8C55,0x0000,0x0000,0x792B,0x0000,0x8C56,0x6321, +0x4B61,0x0000,0x0000,0x0000,0x627E,0x0000,0x0000,0x306B, +0x0000,0x0000,0x792C,0x0000,0x6324,0x0000,0x0000,0x792E, +0x0000,0x8C57,0x8C58,0x8C59,0x0000,0x6323,0x8C5A,0x0000, + +/* 7900h */ +0x792D,0x3E4C,0x0000,0x0000,0x0000,0x0000,0x0000,0x6325, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4143,0x0000, +0x8C5C,0x6327,0x6326,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6328,0x0000,0x8C5D,0x792F,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x8C5F,0x6268,0x0000, +0x0000,0x0000,0x626A,0x632A,0x6329,0x0000,0x7930,0x0000, +0x8C5E,0x7931,0x0000,0x0000,0x7932,0x0000,0x0000,0x0000, +0x0000,0x0000,0x3C28,0x8C60,0x4E69,0x0000,0x3C52,0x0000, +0x632B,0x3737,0x0000,0x0000,0x0000,0x7935,0x7936,0x3540, +0x3527,0x3B63,0x8C61,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4D34,0x0000,0x0000,0x6331,0x0000,0x6330,0x4144,0x632D, +0x8C62,0x0000,0x632F,0x8C63,0x793A,0x3D4B,0x3F40,0x632E, +0x632C,0x0000,0x472A,0x0000,0x0000,0x3E4D,0x0000,0x8C65, +0x493C,0x0000,0x0000,0x0000,0x0000,0x3A57,0x0000,0x0000, +0x0000,0x0000,0x8C66,0x0000,0x0000,0x0000,0x0000,0x4578, +0x0000,0x793E,0x6332,0x0000,0x0000,0x0000,0x0000,0x6333, +0x6349,0x3658,0x0000,0x0000,0x4F3D,0x4135,0x0000,0x0000, +0x0000,0x0000,0x6334,0x0000,0x0000,0x3252,0x4477,0x4A21, +0x0000,0x0000,0x0000,0x0000,0x8C67,0x8C68,0x8C69,0x0000, +0x7942,0x0000,0x0000,0x8C6A,0x0000,0x6335,0x0000,0x0000, +0x0000,0x8C6B,0x0000,0x0000,0x0000,0x0000,0x357A,0x6336, +0x0000,0x8C6C,0x6338,0x0000,0x0000,0x0000,0x6339,0x0000, +0x4729,0x7943,0x0000,0x633A,0x8C6D,0x0000,0x0000,0x0000, +0x7944,0x633B,0x633C,0x8C6E,0x0000,0x3659,0x3253,0x4645, +0x3D28,0x3B64,0x8C6F,0x0000,0x0000,0x0000,0x0000,0x8C70, +0x7945,0x633D,0x7946,0x3D29,0x8C71,0x8C72,0x0000,0x0000, +0x0000,0x324A,0x4943,0x0000,0x7948,0x633E,0x8C73,0x0000, +0x486B,0x0000,0x0000,0x0000,0x0000,0x0000,0x7949,0x4145, +0x0000,0x6341,0x0000,0x6342,0x4769,0x0000,0x3F41,0x633F, +0x0000,0x4361,0x0000,0x794A,0x6340,0x794B,0x0000,0x0000, +0x3E4E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x305C,0x0000,0x0000,0x0000,0x0000, + +/* 7A00h */ +0x3529,0x0000,0x0000,0x794C,0x0000,0x0000,0x0000,0x0000, +0x6343,0x0000,0x8C78,0x4478,0x0000,0x6344,0x4047,0x0000, +0x0000,0x8C79,0x0000,0x0000,0x4C2D,0x8C7A,0x0000,0x4923, +0x6345,0x6346,0x4355,0x8C7B,0x4E47,0x0000,0x8C7C,0x6348, +0x6347,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x8C7E,0x3C6F,0x0000, +0x0000,0x634A,0x3070,0x0000,0x0000,0x0000,0x0000,0x634D, +0x8D21,0x794E,0x0000,0x634B,0x3254,0x374E,0x634C,0x3946, +0x3972,0x0000,0x4A66,0x634E,0x0000,0x0000,0x4B54,0x8D22, +0x0000,0x6350,0x0000,0x0000,0x8D23,0x4051,0x314F,0x323A, +0x302C,0x0000,0x0000,0x0000,0x0000,0x0000,0x8D24,0x634F, +0x0000,0x8D25,0x0000,0x0000,0x8D26,0x794F,0x0000,0x8D27, +0x8D28,0x6351,0x6352,0x3E77,0x0000,0x0000,0x0000,0x8D29, +0x0000,0x6353,0x8D2A,0x334F,0x0000,0x7950,0x0000,0x0000, +0x6355,0x0000,0x0000,0x0000,0x376A,0x8D2B,0x3566,0x0000, +0x8D2C,0x6356,0x3675,0x0000,0x0000,0x6357,0x0000,0x407C, +0x0000,0x464D,0x8D2D,0x4060,0x3A75,0x7952,0x0000,0x0000, +0x6358,0x0000,0x8D2E,0x0000,0x0000,0x0000,0x0000,0x0000, +0x8D2F,0x0000,0x4362,0x416B,0x0000,0x635A,0x635C,0x6359, +0x635B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3722, +0x7953,0x0000,0x0000,0x8D30,0x0000,0x0000,0x0000,0x0000, +0x0000,0x635D,0x3726,0x0000,0x8D31,0x0000,0x3567,0x4D52, +0x635F,0x0000,0x0000,0x7955,0x0000,0x0000,0x6360,0x0000, +0x0000,0x8D34,0x312E,0x7956,0x8D35,0x0000,0x8D36,0x6363, +0x0000,0x0000,0x0000,0x3376,0x6362,0x6361,0x0000,0x6365, +0x635E,0x0000,0x6366,0x4E29,0x8D38,0x6367,0x7957,0x6368, +0x0000,0x8D39,0x5474,0x636A,0x0000,0x6369,0x0000,0x0000, +0x0000,0x636B,0x636C,0x0000,0x4E35,0x636D,0x0000,0x706F, +0x3E4F,0x636E,0x636F,0x3D57,0x0000,0x4638,0x6370,0x8D3A, +0x8D3B,0x0000,0x4328,0x7958,0x0000,0x6371,0x0000,0x433C, +0x6372,0x0000,0x0000,0x0000,0x8D3C,0x0000,0x3625,0x0000, +0x513F,0x435D,0x3C33,0x0000,0x0000,0x7959,0x0000,0x3448, + +/* 7B00h */ +0x0000,0x0000,0x6373,0x0000,0x6422,0x0000,0x6376,0x8D3F, +0x3568,0x0000,0x6375,0x6424,0x0000,0x0000,0x0000,0x6374, +0x0000,0x3E50,0x795A,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6378,0x6379,0x0000,0x452B,0x0000,0x0000,0x637A,0x0000, +0x335E,0x0000,0x0000,0x0000,0x0000,0x3F5A,0x4964,0x8D42, +0x637C,0x0000,0x8D43,0x0000,0x4268,0x795B,0x8D44,0x8D45, +0x0000,0x8D46,0x0000,0x6377,0x0000,0x637B,0x637D,0x0000, +0x0000,0x3A7B,0x0000,0x795C,0x0000,0x8D41,0x0000,0x0000, +0x0000,0x8D4A,0x0000,0x0000,0x0000,0x6426,0x492E,0x795D, +0x4826,0x4579,0x0000,0x365A,0x6425,0x6423,0x795E,0x4835, +0x637E,0x435E,0x457B,0x0000,0x457A,0x8D4C,0x3A76,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6438,0x0000,0x0000, +0x795F,0x0000,0x0000,0x0000,0x8D4E,0x6428,0x8D4F,0x642A, +0x0000,0x8D50,0x0000,0x0000,0x642D,0x7960,0x642E,0x7961, +0x642B,0x642C,0x7962,0x8D51,0x6429,0x6427,0x0000,0x0000, +0x0000,0x8D4D,0x6421,0x0000,0x0000,0x0000,0x0000,0x8D49, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4A4F,0x3255, +0x0000,0x0000,0x0000,0x6435,0x0000,0x6432,0x0000,0x6437, +0x8D54,0x8D55,0x6436,0x0000,0x4773,0x4C27,0x0000,0x3B3B, +0x6430,0x6439,0x6434,0x8D56,0x6433,0x642F,0x7963,0x6431, +0x0000,0x3449,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x433D,0x0000,0x0000,0x407D,0x0000,0x8D58, +0x0000,0x4822,0x0000,0x0000,0x643E,0x8D59,0x0000,0x0000, +0x4824,0x0000,0x0000,0x0000,0x8D5A,0x0000,0x0000,0x0000, +0x4061,0x643B,0x0000,0x0000,0x484F,0x8D5B,0x643F,0x4A53, +0x0000,0x435B,0x8D5C,0x643A,0x643C,0x0000,0x0000,0x643D, +0x0000,0x0000,0x0000,0x0000,0x8D5F,0x0000,0x8D60,0x7965, +0x0000,0x7966,0x8D61,0x0000,0x0000,0x6440,0x0000,0x0000, +0x3C44,0x0000,0x0000,0x0000,0x4646,0x6445,0x6444,0x0000, +0x0000,0x6441,0x8D62,0x0000,0x0000,0x4F36,0x0000,0x0000, +0x8D63,0x0000,0x0000,0x644A,0x0000,0x0000,0x644E,0x644B, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 7C00h */ +0x6447,0x7967,0x0000,0x8D64,0x0000,0x0000,0x0000,0x6448, +0x0000,0x0000,0x0000,0x8D65,0x0000,0x644D,0x8D66,0x8D67, +0x0000,0x6442,0x5255,0x6449,0x6443,0x0000,0x0000,0x644C, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7969,0x6452, +0x796A,0x344A,0x0000,0x644F,0x0000,0x0000,0x8D68,0x6450, +0x0000,0x0000,0x6451,0x6454,0x0000,0x0000,0x0000,0x0000, +0x0000,0x7968,0x0000,0x796B,0x0000,0x0000,0x796C,0x6453, +0x4876,0x0000,0x0000,0x0000,0x0000,0x6455,0x4E7C,0x4A6D, +0x645A,0x0000,0x0000,0x6457,0x0000,0x8D69,0x0000,0x0000, +0x0000,0x0000,0x8D6A,0x0000,0x6456,0x4052,0x0000,0x6459, +0x645B,0x8D6B,0x0000,0x0000,0x6458,0x0000,0x645F,0x8D6C, +0x645C,0x796F,0x0000,0x0000,0x0000,0x0000,0x8D6D,0x645D, +0x6446,0x8D6E,0x0000,0x0000,0x645E,0x6460,0x0000,0x0000, +0x0000,0x8D6F,0x0000,0x0000,0x6461,0x7970,0x8D70,0x8D71, +0x8D72,0x0000,0x0000,0x4A46,0x0000,0x6462,0x0000,0x0000, +0x0000,0x7971,0x0000,0x0000,0x0000,0x0000,0x4C62,0x0000, +0x0000,0x364E,0x3729,0x6463,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4A34,0x0000,0x3F68,0x0000,0x4C30,0x0000,0x7972, +0x6464,0x0000,0x4E33,0x0000,0x7973,0x4774,0x0000,0x4146, +0x4734,0x0000,0x0000,0x3D4D,0x0000,0x0000,0x0000,0x3040, +0x7974,0x6469,0x6467,0x0000,0x6465,0x3421,0x8D76,0x3E51, +0x646A,0x0000,0x0000,0x6468,0x0000,0x6466,0x646E,0x0000, +0x0000,0x646D,0x646C,0x646B,0x0000,0x0000,0x8D78,0x8D79, +0x0000,0x646F,0x0000,0x0000,0x7975,0x6470,0x403A,0x8D7A, +0x6471,0x0000,0x6473,0x0000,0x8D7C,0x6472,0x0000,0x0000, +0x8D7E,0x0000,0x3852,0x0000,0x0000,0x8E21,0x4138,0x0000, +0x0000,0x0000,0x6475,0x0000,0x0000,0x7976,0x457C,0x8E23, +0x6474,0x7977,0x0000,0x0000,0x6476,0x7978,0x4A35,0x416C, +0x3947,0x0000,0x6477,0x0000,0x0000,0x0000,0x8E25,0x4E48, +0x0000,0x0000,0x0000,0x8E26,0x0000,0x0000,0x0000,0x6479, +0x0000,0x0000,0x647A,0x0000,0x647B,0x8E28,0x647C,0x0000, +0x3B65,0x0000,0x647D,0x374F,0x0000,0x0000,0x356A,0x0000, + +/* 7D00h */ +0x352A,0x0000,0x6521,0x8E29,0x4C73,0x3948,0x647E,0x7979, +0x797A,0x8E2A,0x6524,0x4C66,0x0000,0x473C,0x0000,0x0000, +0x4933,0x0000,0x8E2C,0x797B,0x3D63,0x6523,0x0000,0x3C53, +0x3949,0x3B66,0x3569,0x4A36,0x6522,0x797C,0x8E2D,0x0000, +0x4147,0x4B42,0x3A77,0x797D,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3B67,0x445D,0x0000,0x6527,0x4E5F, +0x3A59,0x797E,0x6528,0x3F42,0x0000,0x652A,0x0000,0x0000, +0x0000,0x3E52,0x3A30,0x0000,0x0000,0x8E30,0x8E31,0x6529, +0x8E32,0x7A21,0x3D2A,0x383E,0x4148,0x6525,0x652B,0x8E33, +0x7A22,0x0000,0x0000,0x6526,0x3750,0x0000,0x652E,0x6532, +0x376B,0x0000,0x0000,0x7A23,0x0000,0x0000,0x652D,0x0000, +0x0000,0x8E37,0x8E38,0x6536,0x7A24,0x0000,0x394A,0x0000, +0x0000,0x4D6D,0x303C,0x6533,0x0000,0x0000,0x356B,0x0000, +0x6530,0x0000,0x8E39,0x0000,0x0000,0x0000,0x6531,0x0000, +0x8E3A,0x457D,0x652F,0x652C,0x0000,0x3328,0x4064,0x0000, +0x0000,0x3828,0x7A25,0x0000,0x0000,0x6538,0x0000,0x8E3C, +0x0000,0x0000,0x0000,0x7A26,0x0000,0x0000,0x8E3E,0x0000, +0x8E3F,0x6535,0x0000,0x7A27,0x8E40,0x0000,0x0000,0x6537, +0x0000,0x0000,0x0000,0x6534,0x0000,0x0000,0x0000,0x8E41, +0x0000,0x3751,0x4233,0x6539,0x416E,0x8E43,0x0000,0x6546, +0x7A28,0x0000,0x6542,0x653C,0x0000,0x0000,0x7A29,0x8E44, +0x0000,0x0000,0x8E45,0x6540,0x3C7A,0x305D,0x653B,0x6543, +0x6547,0x394B,0x4C56,0x0000,0x4456,0x653D,0x8E46,0x8E47, +0x6545,0x0000,0x653A,0x433E,0x0000,0x653F,0x303D,0x4C4A, +0x8E48,0x0000,0x7A2A,0x0000,0x0000,0x0000,0x0000,0x653E, +0x0000,0x0000,0x365B,0x486C,0x7A2B,0x0000,0x0000,0x416D, +0x0000,0x4E50,0x3D6F,0x0000,0x0000,0x656E,0x7A2C,0x8E49, +0x6548,0x8E4A,0x407E,0x0000,0x6544,0x6549,0x654B,0x0000, +0x4479,0x654E,0x0000,0x7A2D,0x654A,0x0000,0x8E4B,0x0000, +0x4A54,0x344B,0x0000,0x0000,0x4C4B,0x0000,0x0000,0x305E, +0x0000,0x8E4C,0x654D,0x0000,0x4E7D,0x0000,0x0000,0x0000, +0x0000,0x8E4D,0x0000,0x654C,0x0000,0x0000,0x0000,0x0000, + +/* 7E00h */ +0x0000,0x316F,0x0000,0x0000,0x466C,0x654F,0x0000,0x0000, +0x7A30,0x6556,0x6550,0x6557,0x0000,0x0000,0x0000,0x0000, +0x8E51,0x7A31,0x6553,0x0000,0x0000,0x7A32,0x0000,0x8E52, +0x0000,0x0000,0x0000,0x477B,0x0000,0x8E53,0x3C4A,0x6555, +0x8E54,0x6552,0x6558,0x6551,0x0000,0x0000,0x3D44,0x8E55, +0x7A2F,0x0000,0x0000,0x4B25,0x8E56,0x0000,0x3D4C,0x0000, +0x0000,0x6554,0x6560,0x0000,0x0000,0x655C,0x0000,0x655F, +0x0000,0x655D,0x6561,0x655B,0x0000,0x6541,0x4053,0x0000, +0x0000,0x484B,0x0000,0x655E,0x0000,0x8E57,0x6559,0x7A34, +0x0000,0x0000,0x4121,0x3752,0x0000,0x3D2B,0x0000,0x0000, +0x0000,0x0000,0x7A35,0x0000,0x3F25,0x4136,0x6564,0x0000, +0x0000,0x6566,0x6567,0x0000,0x0000,0x6563,0x6565,0x0000, +0x0000,0x7A36,0x0000,0x0000,0x0000,0x0000,0x655A,0x6562, +0x0000,0x656A,0x6569,0x7E7E,0x0000,0x4B7A,0x0000,0x0000, +0x372B,0x0000,0x0000,0x8E58,0x0000,0x8E59,0x0000,0x0000, +0x0000,0x6568,0x0000,0x656C,0x656B,0x656F,0x8E5A,0x6571, +0x0000,0x0000,0x3B3C,0x656D,0x0000,0x0000,0x8E5B,0x8E5C, +0x6572,0x6573,0x7A37,0x0000,0x6574,0x7A38,0x657A,0x453B, +0x6576,0x8E5E,0x6575,0x6577,0x6578,0x0000,0x6579,0x0000, +0x8E5F,0x0000,0x8E60,0x657B,0x657C,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 7F00h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x344C,0x0000, +0x657D,0x0000,0x657E,0x8E63,0x8E62,0x0000,0x8E64,0x0000, +0x0000,0x0000,0x0000,0x8E65,0x8E66,0x6621,0x0000,0x7A39, +0x0000,0x0000,0x0000,0x0000,0x6622,0x6623,0x6624,0x8E67, +0x6625,0x6626,0x8E6A,0x0000,0x6628,0x6627,0x0000,0x0000, +0x6629,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x662A, +0x662B,0x8E6C,0x0000,0x8E6D,0x8E6E,0x0000,0x0000,0x662E, +0x662C,0x662D,0x3A61,0x3753,0x0000,0x8E6F,0x4356,0x0000, +0x4833,0x0000,0x3D70,0x0000,0x0000,0x474D,0x0000,0x486D, +0x662F,0x586D,0x0000,0x0000,0x0000,0x8E70,0x8E71,0x0000, +0x0000,0x0000,0x6630,0x6632,0x0000,0x4D65,0x6631,0x6634, +0x6633,0x0000,0x4D53,0x0000,0x6635,0x0000,0x487E,0x0000, +0x8E73,0x7A3B,0x0000,0x0000,0x6636,0x0000,0x8E76,0x7A3C, +0x0000,0x0000,0x6639,0x0000,0x8E77,0x6638,0x6637,0x0000, +0x0000,0x0000,0x0000,0x663A,0x3732,0x0000,0x0000,0x0000, +0x4122,0x3541,0x0000,0x0000,0x0000,0x8E78,0x663E,0x663B, +0x0000,0x0000,0x663C,0x0000,0x0000,0x0000,0x663F,0x0000, +0x6640,0x663D,0x0000,0x0000,0x0000,0x3129,0x0000,0x7A3D, +0x0000,0x3227,0x0000,0x8E7A,0x0000,0x6642,0x6643,0x0000, +0x0000,0x0000,0x6644,0x0000,0x4D62,0x0000,0x7A3E,0x8E7B, +0x0000,0x0000,0x3D2C,0x0000,0x6646,0x6645,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7A3F,0x0000,0x0000,0x0000,0x7A40, +0x3F69,0x6647,0x0000,0x8E7C,0x0000,0x8E7D,0x6648,0x0000, +0x0000,0x6649,0x0000,0x3465,0x7A41,0x0000,0x7A42,0x8E7E, +0x344D,0x0000,0x8F21,0x664A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x664B,0x7A43,0x4B5D,0x4D63,0x0000,0x0000,0x0000, + +/* 8000h */ +0x4D54,0x4F37,0x8F22,0x394D,0x664E,0x3C54,0x664D,0x0000, +0x8F24,0x0000,0x8F23,0x664F,0x3C29,0x0000,0x8F25,0x0000, +0x4251,0x8F26,0x6650,0x0000,0x7A45,0x394C,0x8F27,0x4C57, +0x6651,0x6652,0x0000,0x0000,0x6653,0x0000,0x0000,0x0000, +0x0000,0x6654,0x0000,0x0000,0x8F28,0x0000,0x7A46,0x0000, +0x6655,0x0000,0x0000,0x0000,0x8F29,0x0000,0x0000,0x0000, +0x8F2A,0x0000,0x0000,0x3C2A,0x0000,0x7A47,0x4C6D,0x7A48, +0x0000,0x0000,0x0000,0x6657,0x7A49,0x433F,0x0000,0x6656, +0x0000,0x0000,0x0000,0x8F2B,0x0000,0x0000,0x6659,0x0000, +0x0000,0x0000,0x6658,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x665A,0x0000,0x0000,0x0000,0x403B,0x0000, +0x665B,0x0000,0x665C,0x0000,0x0000,0x0000,0x4A39,0x665D, +0x0000,0x416F,0x665E,0x0000,0x0000,0x0000,0x8F2C,0x0000, +0x665F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4E7E, +0x6662,0x8F2D,0x6661,0x6660,0x4430,0x8F2E,0x6663,0x3F26, +0x0000,0x6664,0x0000,0x8F2F,0x0000,0x6665,0x4F38,0x6666, +0x0000,0x0000,0x0000,0x0000,0x6667,0x6669,0x6668,0x4825, +0x0000,0x4679,0x0000,0x4F3E,0x4829,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x666B,0x0000,0x0000,0x3E53,0x0000, +0x492A,0x8F30,0x666C,0x666A,0x8F31,0x344E,0x0000,0x0000, +0x0000,0x3854,0x3B68,0x0000,0x8F32,0x486E,0x0000,0x8F33, +0x0000,0x382A,0x4B43,0x0000,0x666F,0x666D,0x0000,0x394E, +0x0000,0x394F,0x3069,0x0000,0x3A68,0x0000,0x0000,0x0000, +0x8F34,0x0000,0x4759,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x305F,0x6674,0x8F36,0x4340,0x0000, +0x0000,0x0000,0x7A4A,0x0000,0x4758,0x0000,0x425B,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x8F37,0x6676,0x7A4B, +0x8F38,0x6672,0x6675,0x6670,0x0000,0x6673,0x4B26,0x0000, +0x7A4C,0x3855,0x0000,0x0000,0x307D,0x6671,0x8F39,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6678, +0x0000,0x6679,0x0000,0x7A4D,0x4639,0x8F3C,0x0000,0x0000, +0x363B,0x0000,0x0000,0x8F3D,0x6726,0x473D,0x0000,0x0000, + +/* 8100h */ +0x0000,0x0000,0x3B69,0x0000,0x0000,0x363C,0x4048,0x4F46, +0x4C2E,0x6677,0x4054,0x0000,0x0000,0x8F3B,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8F40,0x0000, +0x7A4E,0x0000,0x3553,0x667A,0x0000,0x0000,0x8F41,0x0000, +0x0000,0x0000,0x0000,0x667C,0x8F43,0x0000,0x0000,0x8F44, +0x0000,0x667B,0x0000,0x0000,0x8F45,0x0000,0x0000,0x667D, +0x0000,0x4326,0x0000,0x473E,0x0000,0x8F3F,0x0000,0x0000, +0x0000,0x4431,0x0000,0x0000,0x0000,0x8F47,0x6723,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6722,0x0000, +0x0000,0x0000,0x7A4F,0x667E,0x0000,0x0000,0x3F55,0x0000, +0x4965,0x6725,0x0000,0x6724,0x3950,0x4F53,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6735, +0x7A50,0x0000,0x0000,0x0000,0x0000,0x6729,0x672A,0x7A51, +0x7A52,0x8F49,0x0000,0x3C70,0x0000,0x7A53,0x6728,0x0000, +0x3978,0x6727,0x0000,0x0000,0x672B,0x0000,0x0000,0x0000, +0x4432,0x4A22,0x4123,0x0000,0x0000,0x0000,0x0000,0x425C, +0x672F,0x8F4B,0x6730,0x672C,0x8F4D,0x8F4E,0x0000,0x0000, +0x672D,0x0000,0x672E,0x0000,0x0000,0x0000,0x0000,0x3951, +0x0000,0x0000,0x0000,0x6736,0x0000,0x6732,0x0000,0x0000, +0x8F50,0x0000,0x4966,0x0000,0x4B6C,0x4928,0x0000,0x0000, +0x6731,0x0000,0x0000,0x6734,0x6733,0x0000,0x0000,0x0000, +0x4B44,0x6737,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6738,0x0000,0x8F51,0x4137,0x0000,0x6739,0x0000,0x0000, +0x673B,0x0000,0x673F,0x7A54,0x0000,0x673C,0x673A,0x473F, +0x673D,0x8F52,0x673E,0x8F53,0x0000,0x0000,0x3232,0x0000, +0x6745,0x6740,0x7A55,0x0000,0x0000,0x6741,0x0000,0x7A56, +0x0000,0x6742,0x0000,0x4221,0x0000,0x0000,0x8F54,0x7A57, +0x6744,0x6743,0x6746,0x8F55,0x0000,0x0000,0x0000,0x6747, +0x6748,0x0000,0x0000,0x3F43,0x8F57,0x3269,0x0000,0x6749, +0x4E57,0x0000,0x3C2B,0x0000,0x8F59,0x3D2D,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3B6A,0x4357,0x0000,0x0000,0x0000, +0x0000,0x0000,0x674A,0x674B,0x3131,0x8F5B,0x674C,0x8F5C, + +/* 8200h */ +0x0000,0x674D,0x674E,0x0000,0x8F5E,0x674F,0x0000,0x6750, +0x363D,0x5A2A,0x6751,0x0000,0x4065,0x6752,0x3C4B,0x0000, +0x6753,0x0000,0x5030,0x0000,0x0000,0x0000,0x6754,0x4A5E, +0x345C,0x8F60,0x0000,0x4124,0x3D58,0x0000,0x4971,0x3D2E, +0x0000,0x8F61,0x8F62,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6755,0x3952,0x6756,0x484C,0x0000,0x6764,0x0000, +0x0000,0x0000,0x8F64,0x6758,0x8F65,0x4249,0x4775,0x383F, +0x6757,0x4125,0x0000,0x0000,0x8F66,0x0000,0x0000,0x0000, +0x6759,0x0000,0x0000,0x0000,0x0000,0x8F69,0x8F67,0x447A, +0x0000,0x8F68,0x0000,0x8F6B,0x0000,0x0000,0x0000,0x8F6D, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8F6F, +0x675B,0x675A,0x675D,0x0000,0x8F71,0x675C,0x0000,0x675E, +0x7A5B,0x0000,0x6760,0x8F72,0x675F,0x0000,0x344F,0x0000, +0x6761,0x0000,0x6762,0x6763,0x0000,0x0000,0x3A31,0x4E49, +0x0000,0x6765,0x3F27,0x0000,0x7A5C,0x0000,0x3170,0x6766, +0x6767,0x8F76,0x0000,0x0000,0x0000,0x8F78,0x6768,0x8F79, +0x0000,0x0000,0x0000,0x8F7A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x8F7B,0x3072,0x0000,0x6769,0x7A5E,0x0000, +0x0000,0x0000,0x676A,0x8F7C,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4967,0x0000,0x0000,0x0000,0x3C47,0x0000,0x676C, +0x0000,0x7A5F,0x0000,0x7A60,0x7A61,0x3329,0x3032,0x8F7D, +0x8F7E,0x7A62,0x0000,0x676B,0x676E,0x474E,0x7A63,0x3F44, +0x0000,0x3256,0x9021,0x4B27,0x9022,0x0000,0x0000,0x7A64, +0x375D,0x365C,0x9023,0x676D,0x9024,0x326A,0x7A65,0x7A66, +0x0000,0x0000,0x0000,0x0000,0x0000,0x3423,0x7A67,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3171,0x6772,0x4E6A,0x425D,0x7A68,0x0000,0x4944, +0x0000,0x677E,0x0000,0x3257,0x677C,0x0000,0x677A,0x6771, +0x0000,0x676F,0x9025,0x6770,0x0000,0x3C63,0x366C,0x4377, +0x9026,0x0000,0x0000,0x4651,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3151,0x0000,0x6774,0x6773,0x0000,0x0000,0x9027, +0x0000,0x6779,0x6775,0x6778,0x0000,0x7A69,0x7A6A,0x0000, + +/* 8300h */ +0x7A6B,0x7A6C,0x4C50,0x6777,0x3258,0x337D,0x677B,0x9028, +0x9029,0x677D,0x0000,0x0000,0x902A,0x0000,0x3754,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6823,0x682C, +0x682D,0x0000,0x0000,0x902C,0x302B,0x902D,0x0000,0x0000, +0x0000,0x0000,0x7A6E,0x6834,0x0000,0x0000,0x0000,0x0000, +0x3071,0x0000,0x0000,0x682B,0x0000,0x7A6F,0x0000,0x682A, +0x902E,0x6825,0x6824,0x0000,0x6822,0x6821,0x4363,0x0000, +0x427B,0x6827,0x7A70,0x0000,0x902F,0x0000,0x0000,0x0000, +0x6826,0x0000,0x0000,0x7A71,0x9030,0x6829,0x0000,0x7A72, +0x0000,0x4170,0x3755,0x0000,0x0000,0x0000,0x0000,0x3141, +0x6828,0x7A73,0x3953,0x0000,0x902B,0x7A74,0x0000,0x9031, +0x4171,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7A6D,0x864A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x683A,0x0000,0x683B,0x0000,0x3259, +0x0000,0x0000,0x0000,0x322E,0x6838,0x7A75,0x0000,0x9033, +0x0000,0x0000,0x0000,0x0000,0x0000,0x682E,0x7A76,0x6836, +0x0000,0x683D,0x6837,0x0000,0x0000,0x9036,0x6835,0x0000, +0x0000,0x0000,0x7A77,0x6776,0x9037,0x9038,0x6833,0x0000, +0x7A78,0x0000,0x682F,0x9039,0x0000,0x903A,0x3450,0x6831, +0x683C,0x0000,0x6832,0x0000,0x0000,0x0000,0x0000,0x7A79, +0x683E,0x7A7A,0x6830,0x477C,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4D69,0x0000,0x0000,0x0000,0x6839,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x684F,0x0000,0x7A7B, +0x7A7C,0x6847,0x0000,0x0000,0x0000,0x3F7B,0x0000,0x7A7D, +0x0000,0x903B,0x3546,0x0000,0x365D,0x0000,0x6842,0x7A7E, +0x903C,0x7B21,0x0000,0x325B,0x903D,0x0000,0x3E54,0x0000, +0x6845,0x0000,0x0000,0x0000,0x3A5A,0x903E,0x0000,0x4551, +0x684A,0x7B22,0x0000,0x0000,0x0000,0x903F,0x0000,0x0000, +0x0000,0x4A6E,0x7B23,0x6841,0x0000,0x0000,0x0000,0x325A, +0x3856,0x4929,0x684B,0x0000,0x683F,0x0000,0x0000,0x6848, +0x0000,0x9040,0x0000,0x6852,0x0000,0x6843,0x0000,0x0000, + +/* 8400h */ +0x0000,0x7B24,0x0000,0x6844,0x463A,0x0000,0x7B25,0x6849, +0x0000,0x0000,0x7B26,0x6846,0x4B28,0x684C,0x3060,0x9041, +0x0000,0x9042,0x0000,0x6840,0x0000,0x9043,0x0000,0x9045, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x684E,0x0000,0x684D,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x476B,0x6854,0x0000,0x685F,0x0000,0x0000,0x0000, +0x0000,0x337E,0x0000,0x0000,0x0000,0x6862,0x0000,0x0000, +0x6850,0x9046,0x0000,0x0000,0x6855,0x4D6E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x685E,0x0000, +0x7B28,0x4D55,0x9047,0x0000,0x0000,0x0000,0x4E2A,0x9048, +0x0000,0x9049,0x904A,0x0000,0x0000,0x0000,0x0000,0x4378, +0x0000,0x904B,0x904C,0x336B,0x904D,0x0000,0x0000,0x7B29, +0x0000,0x4972,0x6864,0x4621,0x0000,0x904F,0x3031,0x0000, +0x0000,0x685D,0x0000,0x6859,0x4172,0x6853,0x685B,0x6860, +0x7B2A,0x472C,0x0000,0x7B2B,0x0000,0x302A,0x9050,0x6858, +0x9051,0x6861,0x4978,0x0000,0x9052,0x0000,0x0000,0x0000, +0x0000,0x9053,0x685C,0x0000,0x6857,0x7B2C,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3E55,0x0000,0x0000,0x0000,0x0000, +0x3D2F,0x0000,0x0000,0x0000,0x3C2C,0x0000,0x0000,0x9056, +0x0000,0x4C58,0x0000,0x0000,0x4947,0x0000,0x7B2D,0x6867, +0x0000,0x6870,0x0000,0x0000,0x0000,0x0000,0x9057,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x685A,0x0000,0x7B2E, +0x0000,0x0000,0x3377,0x0000,0x7B2F,0x0000,0x0000,0x0000, +0x3E78,0x6865,0x7B30,0x686A,0x4173,0x0000,0x9058,0x6866, +0x7B31,0x686D,0x7B32,0x0000,0x435F,0x0000,0x686E,0x0000, +0x0000,0x4D56,0x6863,0x3338,0x0000,0x6869,0x905A,0x905B, +0x686C,0x4C2C,0x0000,0x905C,0x0000,0x0000,0x686F,0x0000, +0x0000,0x6868,0x686B,0x0000,0x9055,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x905E, +0x0000,0x0000,0x905F,0x0000,0x4B29,0x0000,0x4F21,0x9060, +0x9061,0x9062,0x0000,0x0000,0x6873,0x0000,0x0000,0x0000, +0x0000,0x0000,0x9063,0x0000,0x687A,0x9064,0x0000,0x6872, + +/* 8500h */ +0x3C43,0x0000,0x0000,0x0000,0x0000,0x0000,0x6851,0x0000, +0x0000,0x0000,0x0000,0x0000,0x9065,0x0000,0x0000,0x0000, +0x0000,0x4A4E,0x0000,0x4C22,0x6879,0x6878,0x0000,0x6874, +0x6875,0x0000,0x3136,0x9066,0x0000,0x0000,0x7B35,0x6877, +0x0000,0x6871,0x0000,0x7B36,0x9067,0x9068,0x4455,0x0000, +0x0000,0x0000,0x0000,0x9069,0x6876,0x307E,0x0000,0x7B37, +0x0000,0x0000,0x7B34,0x0000,0x906A,0x4222,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x4A43,0x906F,0x0000, +0x687B,0x6921,0x0000,0x4859,0x0000,0x0000,0x0000,0x0000, +0x687E,0x3E56,0x3C49,0x6923,0x0000,0x0000,0x363E,0x906B, +0x0000,0x9070,0x0000,0x9071,0x0000,0x6924,0x0000,0x4979, +0x687D,0x7B38,0x6856,0x0000,0x0000,0x0000,0x9072,0x0000, +0x0000,0x9073,0x9074,0x687C,0x7B39,0x0000,0x0000,0x0000, +0x4F4F,0x4622,0x4973,0x0000,0x0000,0x692B,0x0000,0x906C, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6931, +0x0000,0x0000,0x7B3C,0x9076,0x0000,0x9077,0x6932,0x9078, +0x6925,0x9079,0x0000,0x0000,0x4776,0x0000,0x907A,0x692F, +0x6927,0x0000,0x6929,0x0000,0x7B3D,0x0000,0x0000,0x7B3E, +0x6933,0x6928,0x0000,0x907B,0x692C,0x0000,0x0000,0x3172, +0x0000,0x4665,0x0000,0x692D,0x6930,0x907C,0x0000,0x907D, +0x0000,0x0000,0x7B3F,0x0000,0x6926,0x0000,0x4126,0x0000, +0x692A,0x3B27,0x3F45,0x3730,0x4C74,0x7B3B,0x4C79,0x3D72, +0x7B40,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9123, +0x0000,0x6937,0x6935,0x0000,0x9124,0x0000,0x0000,0x0000, +0x0000,0x4F4E,0x0000,0x0000,0x0000,0x0000,0x0000,0x9125, +0x0000,0x6934,0x9126,0x7B41,0x0000,0x4D75,0x7B42,0x6936, +0x6938,0x0000,0x0000,0x0000,0x0000,0x6939,0x0000,0x0000, +0x9127,0x9128,0x0000,0x0000,0x693C,0x693A,0x0000,0x9129, +0x0000,0x912A,0x0000,0x0000,0x4623,0x693B,0x912B,0x0000, +0x0000,0x484D,0x692E,0x0000,0x0000,0x7B43,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x912C,0x3D73, +0x0000,0x693D,0x6942,0x4174,0x0000,0x0000,0x6941,0x7B45, + +/* 8600h */ +0x912D,0x0000,0x6922,0x0000,0x7B46,0x7B47,0x6943,0x4149, +0x0000,0x0000,0x693E,0x6940,0x0000,0x0000,0x0000,0x0000, +0x7B48,0x912E,0x7B44,0x693F,0x0000,0x0000,0x5D31,0x5D22, +0x7B4A,0x0000,0x6945,0x0000,0x0000,0x0000,0x912F,0x0000, +0x0000,0x9130,0x6944,0x0000,0x9131,0x0000,0x0000,0x9132, +0x0000,0x7B4B,0x0000,0x0000,0x0000,0x4D76,0x0000,0x623C, +0x6946,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7B4C,0x9134,0x0000,0x0000,0x9135,0x0000,0x0000,0x6947, +0x9137,0x2F68,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6948,0x3857,0x0000, +0x3554,0x0000,0x0000,0x9139,0x694A,0x515D,0x913A,0x7B4D, +0x0000,0x0000,0x3575,0x7B4E,0x4E3A,0x0000,0x3673,0x694B, +0x0000,0x0000,0x7B50,0x0000,0x0000,0x0000,0x0000,0x694C, +0x0000,0x0000,0x0000,0x436E,0x7B52,0x0000,0x0000,0x913B, +0x0000,0x694D,0x0000,0x0000,0x0000,0x7B53,0x0000,0x913C, +0x0000,0x467A,0x913D,0x303A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x913E, +0x0000,0x913F,0x3263,0x6952,0x6953,0x9140,0x0000,0x0000, +0x0000,0x9141,0x0000,0x694E,0x0000,0x3B3D,0x0000,0x0000, +0x7B54,0x0000,0x0000,0x0000,0x9142,0x9143,0x0000,0x0000, +0x0000,0x0000,0x0000,0x694F,0x4742,0x0000,0x0000,0x0000, +0x9144,0x6950,0x6951,0x695B,0x0000,0x0000,0x0000,0x6955, +0x6958,0x9146,0x0000,0x9147,0x0000,0x0000,0x6954,0x0000, +0x7B55,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x9148,0x0000,0x9149,0x6956,0x0000,0x6957,0x3C58, +0x0000,0x6959,0x0000,0x4341,0x0000,0x3756,0x3342,0x0000, +0x0000,0x914A,0x0000,0x0000,0x695C,0x914B,0x0000,0x914C, +0x0000,0x333F,0x0000,0x6961,0x0000,0x0000,0x695D,0x6960, +0x0000,0x0000,0x0000,0x914D,0x483A,0x0000,0x914E,0x0000, +0x0000,0x695E,0x0000,0x0000,0x695F,0x4948,0x485A,0x6962, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x427D,0x696C,0x7B56,0x6968,0x7B57,0x7B58,0x326B,0x0000, + +/* 8700h */ +0x6966,0x0000,0x4B2A,0x6967,0x0000,0x9150,0x6964,0x9151, +0x6965,0x696A,0x696D,0x7B59,0x0000,0x696B,0x9152,0x0000, +0x9153,0x6969,0x6963,0x9154,0x0000,0x0000,0x0000,0x0000, +0x4358,0x9155,0x6974,0x0000,0x4C2A,0x0000,0x0000,0x9156, +0x0000,0x9157,0x0000,0x9158,0x0000,0x6972,0x0000,0x0000, +0x0000,0x6973,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x9159,0x0000,0x0000,0x696E,0x0000,0x0000,0x6970, +0x0000,0x0000,0x915A,0x6971,0x0000,0x0000,0x915B,0x696F, +0x915C,0x0000,0x0000,0x915D,0x0000,0x0000,0x0000,0x0000, +0x0000,0x4066,0x0000,0x4F39,0x6978,0x0000,0x6979,0x0000, +0x0000,0x915E,0x0000,0x6A21,0x0000,0x3F2A,0x0000,0x697B, +0x915F,0x697E,0x0000,0x0000,0x0000,0x0000,0x0000,0x6976, +0x6975,0x0000,0x0000,0x6A22,0x9160,0x9161,0x325C,0x0000, +0x697C,0x0000,0x6A23,0x0000,0x0000,0x0000,0x697D,0x0000, +0x0000,0x7B5A,0x9162,0x0000,0x697A,0x0000,0x4433,0x0000, +0x6977,0x0000,0x0000,0x0000,0x9163,0x0000,0x0000,0x4768, +0x0000,0x0000,0x6A27,0x0000,0x0000,0x0000,0x0000,0x7B5B, +0x7B5C,0x9167,0x0000,0x9168,0x0000,0x4D3B,0x0000,0x0000, +0x0000,0x0000,0x0000,0x9169,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6A26, +0x916A,0x0000,0x6A25,0x0000,0x0000,0x0000,0x0000,0x9166, +0x0000,0x0000,0x0000,0x6A2E,0x7B5D,0x7B5E,0x0000,0x6A28, +0x0000,0x0000,0x0000,0x6A30,0x0000,0x7B5F,0x0000,0x0000, +0x0000,0x0000,0x4D66,0x6A33,0x0000,0x6A2A,0x916D,0x0000, +0x6A2B,0x916F,0x0000,0x0000,0x6A2F,0x0000,0x6A32,0x6A31, +0x0000,0x0000,0x0000,0x6A29,0x0000,0x0000,0x9170,0x0000, +0x6A2C,0x0000,0x6A3D,0x0000,0x0000,0x0000,0x7B61,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9172, +0x6A36,0x0000,0x0000,0x9174,0x0000,0x9175,0x9176,0x0000, +0x0000,0x0000,0x9177,0x9178,0x7B62,0x9179,0x0000,0x6A34, +0x0000,0x0000,0x6A35,0x0000,0x0000,0x9171,0x6A3A,0x6A3B, +0x0000,0x332A,0x0000,0x3542,0x0000,0x0000,0x6A39,0x0000, + +/* 8800h */ +0x0000,0x917A,0x0000,0x917B,0x0000,0x6A24,0x7B63,0x0000, +0x0000,0x0000,0x7B64,0x917C,0x0000,0x6A38,0x6A3C,0x6A37, +0x7B65,0x6A3E,0x0000,0x917D,0x7B66,0x6A40,0x6A3F,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7B67, +0x0000,0x6A42,0x6A41,0x695A,0x0000,0x0000,0x0000,0x6A46, +0x917E,0x0000,0x0000,0x0000,0x0000,0x0000,0x9221,0x0000, +0x0000,0x6A43,0x9222,0x0000,0x0000,0x0000,0x6A44,0x0000, +0x0000,0x6A45,0x0000,0x6A47,0x9223,0x0000,0x0000,0x0000, +0x376C,0x0000,0x6A49,0x0000,0x6A48,0x0000,0x3D30,0x0000, +0x0000,0x0000,0x9225,0x0000,0x3954,0x5E27,0x0000,0x0000, +0x0000,0x0000,0x6A4A,0x3D51,0x0000,0x0000,0x0000,0x3339, +0x9226,0x6A4B,0x0000,0x3152,0x0000,0x3E57,0x6A4C,0x9227, +0x0000,0x3955,0x6A4D,0x3061,0x9228,0x0000,0x0000,0x0000, +0x493D,0x922B,0x0000,0x6A4E,0x0000,0x0000,0x0000,0x922D, +0x3F6A,0x0000,0x6A55,0x0000,0x0000,0x6A52,0x0000,0x436F, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6A53,0x6A50,0x365E, +0x0000,0x6A4F,0x6A56,0x0000,0x0000,0x0000,0x0000,0x0000, +0x3736,0x0000,0x0000,0x425E,0x0000,0x6A5C,0x0000,0x0000, +0x0000,0x0000,0x6A58,0x0000,0x0000,0x0000,0x4235,0x6A57, +0x7B68,0x6A5A,0x0000,0x0000,0x0000,0x0000,0x6A51,0x0000, +0x922E,0x0000,0x6A5B,0x0000,0x6A5D,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7B69,0x486F,0x0000,0x0000,0x6A59,0x0000, +0x6A5E,0x6A60,0x0000,0x0000,0x3853,0x6A54,0x0000,0x3041, +0x0000,0x0000,0x0000,0x0000,0x922F,0x9230,0x9231,0x6A5F, +0x9232,0x3A5B,0x4E76,0x6A61,0x6A62,0x4175,0x0000,0x0000, +0x0000,0x0000,0x7B6A,0x0000,0x0000,0x0000,0x7B6B,0x4E22, +0x0000,0x9235,0x9233,0x9236,0x6A63,0x4D35,0x0000,0x0000, +0x6A64,0x6A65,0x0000,0x9237,0x4A64,0x6A66,0x0000,0x3A40, +0x0000,0x4E23,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6A6B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x9238,0x9239,0x6A6C,0x3E58,0x6A6A,0x7B6D,0x0000,0x0000, +0x4D67,0x6A67,0x0000,0x0000,0x6A69,0x403D,0x3F7E,0x0000, + +/* 8900h */ +0x0000,0x923B,0x6A68,0x0000,0x6A6D,0x0000,0x0000,0x4A23, +0x0000,0x0000,0x6A6F,0x0000,0x6A6E,0x0000,0x0000,0x0000, +0x336C,0x0000,0x4B2B,0x6A70,0x0000,0x0000,0x0000,0x0000, +0x7B70,0x7B71,0x7B72,0x0000,0x7B6E,0x6A7C,0x6A72,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6A73,0x0000,0x7B73, +0x0000,0x0000,0x6A74,0x6A75,0x0000,0x0000,0x0000,0x0000, +0x7B74,0x0000,0x7B75,0x0000,0x0000,0x0000,0x6A79,0x923D, +0x6A7A,0x7B76,0x0000,0x6A78,0x0000,0x0000,0x0000,0x0000, +0x7B77,0x6A76,0x923F,0x6A71,0x6A77,0x9240,0x0000,0x0000, +0x0000,0x9241,0x0000,0x0000,0x6A7B,0x7037,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3228,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6A7E,0x365F, +0x6A7D,0x0000,0x9244,0x0000,0x6B22,0x0000,0x6B21,0x0000, +0x0000,0x0000,0x6B24,0x0000,0x0000,0x6B23,0x0000,0x6B25, +0x0000,0x0000,0x3D31,0x0000,0x6B26,0x0000,0x0000,0x6B27, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6B28,0x403E, +0x9245,0x4D57,0x0000,0x6B29,0x0000,0x0000,0x4A24,0x4746, +0x6B2A,0x9246,0x6B2B,0x382B,0x0000,0x0000,0x0000,0x352C, +0x9247,0x0000,0x0000,0x6B2C,0x7B78,0x0000,0x3B6B,0x4741, +0x6B2D,0x0000,0x3350,0x0000,0x0000,0x0000,0x0000,0x9248, +0x0000,0x6B2E,0x0000,0x0000,0x0000,0x0000,0x6B30,0x4D77, +0x0000,0x6B2F,0x3F46,0x0000,0x6B31,0x0000,0x0000,0x6B32, +0x9249,0x0000,0x6B33,0x3451,0x0000,0x0000,0x0000,0x924A, +0x0000,0x0000,0x6B34,0x0000,0x0000,0x6B35,0x0000,0x6B36, +0x6B37,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x3351,0x0000,0x7B7A,0x0000,0x924B,0x0000, +0x924C,0x0000,0x6B38,0x0000,0x6B39,0x6B3A,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3272,0x0000,0x7B7B,0x3F28,0x6B3B, +0x0000,0x0000,0x0000,0x924D,0x0000,0x0000,0x0000,0x0000, +0x0000,0x924F,0x0000,0x9250,0x6B3C,0x0000,0x7B7C,0x0000, +0x6B3D,0x0000,0x0000,0x0000,0x0000,0x9251,0x0000,0x9252, + +/* 8A00h */ +0x3840,0x0000,0x447B,0x6B3E,0x0000,0x0000,0x0000,0x0000, +0x3757,0x0000,0x3F56,0x0000,0x6B41,0x0000,0x4624,0x0000, +0x6B40,0x9254,0x7B7D,0x3731,0x9255,0x7B7E,0x6B3F,0x4277, +0x352D,0x0000,0x0000,0x6B42,0x0000,0x6B43,0x0000,0x3E59, +0x0000,0x9257,0x7C21,0x376D,0x0000,0x6B44,0x0000,0x0000, +0x0000,0x0000,0x4B2C,0x0000,0x0000,0x405F,0x0000,0x0000, +0x0000,0x3576,0x0000,0x4C75,0x414A,0x9258,0x6B45,0x7C22, +0x0000,0x0000,0x3F47,0x4370,0x3E5A,0x0000,0x9259,0x0000, +0x0000,0x6B46,0x0000,0x0000,0x0000,0x925A,0x6B49,0x7C23, +0x6B4A,0x0000,0x0000,0x0000,0x0000,0x925B,0x7C24,0x0000, +0x3A3E,0x4242,0x6B48,0x0000,0x3E5B,0x493E,0x0000,0x0000, +0x925C,0x0000,0x0000,0x6B47,0x0000,0x7C25,0x3B6C,0x0000, +0x3153,0x7C26,0x6B4E,0x3758,0x0000,0x0000,0x3B6E,0x0000, +0x0000,0x3B6D,0x0000,0x4F4D,0x6B4D,0x6B4C,0x4127,0x0000, +0x354D,0x4F43,0x333A,0x3E5C,0x0000,0x7C27,0x0000,0x0000, +0x0000,0x7C28,0x0000,0x0000,0x6B4B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6B50,0x0000,0x6B51,0x6B4F,0x0000,0x3858, +0x0000,0x4D40,0x0000,0x0000,0x3B6F,0x4727,0x0000,0x0000, +0x925E,0x6B54,0x0000,0x4040,0x0000,0x4342,0x0000,0x0000, +0x4D36,0x0000,0x6B57,0x0000,0x0000,0x0000,0x386C,0x0000, +0x403F,0x6B53,0x0000,0x6B58,0x386D,0x6B55,0x6B56,0x7C29, +0x6B52,0x0000,0x0000,0x0000,0x4062,0x4649,0x925D,0x0000, +0x432F,0x0000,0x325D,0x0000,0x0000,0x0000,0x0000,0x925F, +0x0000,0x4870,0x0000,0x0000,0x3543,0x0000,0x9260,0x4434, +0x0000,0x0000,0x6B5B,0x0000,0x6B59,0x0000,0x0000,0x434C, +0x0000,0x0000,0x0000,0x4041,0x3452,0x6B5A,0x0000,0x3F5B, +0x7C2A,0x0000,0x4E4A,0x0000,0x0000,0x0000,0x4F40,0x9261, +0x0000,0x0000,0x6B5C,0x6B67,0x4435,0x0000,0x6B66,0x7C2B, +0x6B63,0x6B6B,0x6B64,0x0000,0x6B60,0x0000,0x447C,0x6B5F, +0x0000,0x0000,0x0000,0x6B5D,0x0000,0x4D21,0x3B70,0x0000, +0x0000,0x6B61,0x0000,0x6B5E,0x7C2C,0x0000,0x7C2D,0x6B65, +0x3D74,0x0000,0x3841,0x0000,0x9262,0x0000,0x427A,0x0000, + +/* 8B00h */ +0x4B45,0x315A,0x3062,0x0000,0x4625,0x9265,0x0000,0x6B69, +0x0000,0x0000,0x9264,0x0000,0x6B68,0x9266,0x4666,0x0000, +0x6B6D,0x0000,0x0000,0x0000,0x6B62,0x0000,0x6B6C,0x6B6E, +0x0000,0x382C,0x6B6A,0x3956,0x9267,0x3C55,0x0000,0x9268, +0x6B6F,0x4D58,0x0000,0x0000,0x0000,0x0000,0x6B72,0x0000, +0x6B75,0x0000,0x0000,0x6B73,0x4935,0x9269,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6B70,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3660,0x0000,0x0000,0x0000,0x0000,0x6B74,0x0000, +0x0000,0x6B76,0x0000,0x926A,0x0000,0x0000,0x7C31,0x0000, +0x0000,0x6B7A,0x0000,0x0000,0x6B77,0x0000,0x6B79,0x6B78, +0x0000,0x926C,0x0000,0x0000,0x7C32,0x0000,0x6B7B,0x0000, +0x3C31,0x7C33,0x6B7D,0x6B7C,0x4968,0x0000,0x926D,0x6C21, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3759,0x0000, +0x0000,0x7C34,0x0000,0x6B7E,0x6C22,0x0000,0x0000,0x6C23, +0x3544,0x6641,0x3E79,0x0000,0x6C24,0x0000,0x926E,0x386E, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6C25,0x0000,0x926F, +0x6C26,0x9270,0x0000,0x3B3E,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x5A4E,0x9271,0x6C27,0x0000,0x6C28,0x0000, +0x3D32,0x0000,0x6C29,0x6C2A,0x9272,0x9273,0x6C2B,0x0000, +0x0000,0x6C2C,0x6C2D,0x0000,0x9274,0x7C35,0x9275,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 8C00h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x432B, +0x0000,0x9276,0x6C2E,0x0000,0x0000,0x9278,0x0000,0x6C30, +0x0000,0x6C2F,0x0000,0x0000,0x0000,0x927B,0x4626,0x927C, +0x6C31,0x7C36,0x4B2D,0x0000,0x6C32,0x0000,0x6C33,0x927D, +0x6C34,0x0000,0x0000,0x0000,0x927E,0x6C35,0x0000,0x9321, +0x0000,0x0000,0x465A,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3E5D,0x6C36,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7C37,0x9322,0x396B,0x502E,0x6C37,0x9323,0x0000,0x0000, +0x0000,0x0000,0x0000,0x9324,0x0000,0x0000,0x0000,0x0000, +0x6C38,0x493F,0x6C39,0x0000,0x6C41,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6C3A,0x0000,0x0000,0x6C3C,0x0000,0x0000, +0x0000,0x6C3B,0x6C3D,0x0000,0x4B46,0x6C3E,0x6C3F,0x0000, +0x0000,0x0000,0x9327,0x9326,0x6C40,0x0000,0x0000,0x0000, +0x6C42,0x9328,0x0000,0x932A,0x0000,0x332D,0x4467,0x0000, +0x4969,0x3A62,0x3957,0x0000,0x932B,0x0000,0x0000,0x494F, +0x325F,0x484E,0x6C45,0x3453,0x4055,0x6C44,0x6C49,0x4379, +0x4C63,0x0000,0x6C47,0x6C48,0x352E,0x0000,0x6C4A,0x4763, +0x425F,0x0000,0x0000,0x4871,0x453D,0x6C46,0x0000,0x4B47, +0x326C,0x6C4C,0x4F28,0x4442,0x4F45,0x0000,0x0000,0x3B71, +0x6C4B,0x0000,0x4231,0x0000,0x0000,0x6C5C,0x4128,0x0000, +0x0000,0x4678,0x0000,0x4950,0x0000,0x932D,0x932C,0x0000, +0x0000,0x932E,0x6C4F,0x3B3F,0x3B72,0x0000,0x3E5E,0x0000, +0x4765,0x7C39,0x382D,0x6C4E,0x6C4D,0x0000,0x496A,0x0000, +0x0000,0x0000,0x3C41,0x0000,0x0000,0x4552,0x0000,0x0000, +0x9330,0x9331,0x0000,0x0000,0x7C3A,0x0000,0x0000,0x0000, +0x7C3B,0x0000,0x6C51,0x6C52,0x3958,0x6C50,0x7C3C,0x0000, + +/* 8D00h */ +0x0000,0x0000,0x0000,0x0000,0x6C53,0x6C54,0x0000,0x6C56, +0x4223,0x9333,0x6C55,0x3466,0x0000,0x6C58,0x9334,0x6C57, +0x6C59,0x0000,0x7C3E,0x6C5B,0x6C5D,0x0000,0x6C5E,0x0000, +0x0000,0x0000,0x0000,0x7C3F,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x4056,0x0000,0x3C4F,0x6C5F, +0x0000,0x0000,0x0000,0x3352,0x9335,0x6C60,0x0000,0x0000, +0x4176,0x6C61,0x0000,0x6C62,0x496B,0x0000,0x0000,0x352F, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6C63,0x0000,0x0000,0x9336,0x4436,0x0000,0x0000, +0x0000,0x0000,0x315B,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x9337,0x0000,0x0000, +0x0000,0x6C64,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3C71,0x0000,0x0000,0x9338,0x0000, +0x3F76,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7C40, +0x0000,0x0000,0x0000,0x422D,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6C67,0x0000,0x0000,0x0000,0x6C66,0x0000, +0x0000,0x0000,0x6C65,0x0000,0x0000,0x0000,0x933A,0x0000, +0x933B,0x0000,0x0000,0x6C6D,0x6C6B,0x0000,0x7C41,0x6C68, +0x0000,0x7C42,0x0000,0x0000,0x0000,0x0000,0x6C6A,0x7C43, +0x0000,0x933C,0x6C69,0x6C6C,0x0000,0x3577,0x0000,0x6C70, +0x0000,0x4057,0x0000,0x6C71,0x0000,0x0000,0x0000,0x0000, +0x3859,0x0000,0x6C6E,0x6C6F,0x933D,0x0000,0x0000,0x4F29, +0x0000,0x0000,0x0000,0x4437,0x0000,0x4129,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x6C72,0x9340,0x0000,0x6C75, + +/* 8E00h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9341,0x0000, +0x6C73,0x6C74,0x4D59,0x0000,0x933E,0x0000,0x0000,0x4627, +0x6C78,0x0000,0x0000,0x0000,0x9343,0x0000,0x9344,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x6C76,0x6C77,0x6C79, +0x7C44,0x9345,0x9346,0x7C45,0x0000,0x0000,0x0000,0x9347, +0x0000,0x0000,0x6D29,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6C7C,0x0000,0x0000,0x0000,0x6C7D,0x6C7B,0x934A,0x0000, +0x0000,0x934B,0x0000,0x0000,0x0000,0x7C46,0x0000,0x0000, +0x0000,0x0000,0x6C7A,0x0000,0x447D,0x0000,0x0000,0x6D21, +0x6D25,0x6D22,0x6C7E,0x934C,0x6D23,0x0000,0x0000,0x0000, +0x6D24,0x0000,0x0000,0x0000,0x934D,0x6D2B,0x0000,0x0000, +0x0000,0x6D26,0x0000,0x0000,0x0000,0x0000,0x0000,0x4058, +0x6D28,0x0000,0x934E,0x6D2A,0x6D27,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x934F,0x9350,0x0000,0x9351, +0x7C47,0x0000,0x6D2D,0x0000,0x3D33,0x0000,0x6D2C,0x0000, +0x0000,0x0000,0x0000,0x7C48,0x6D2E,0x0000,0x0000,0x0000, +0x0000,0x6D2F,0x0000,0x0000,0x6D32,0x6D31,0x0000,0x6D30, +0x0000,0x0000,0x6D34,0x6D33,0x0000,0x4C76,0x0000,0x0000, +0x0000,0x6D36,0x0000,0x6D35,0x6D37,0x0000,0x0000,0x0000, +0x9352,0x6D38,0x0000,0x0000,0x0000,0x0000,0x9353,0x0000, +0x0000,0x6D3A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6D39,0x3F48,0x6D3B,0x0000,0x9354,0x366D, +0x6D3C,0x6D3E,0x0000,0x9355,0x0000,0x9356,0x9357,0x0000, +0x0000,0x0000,0x0000,0x9358,0x0000,0x0000,0x6D3F,0x0000, +0x7C4A,0x0000,0x0000,0x0000,0x0000,0x6D40,0x6D3D,0x0000, +0x6D41,0x0000,0x3C56,0x6D42,0x3530,0x3733,0x0000,0x0000, +0x0000,0x935A,0x382E,0x0000,0x935B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6D43,0x0000,0x0000,0x0000,0x4670, +0x0000,0x0000,0x453E,0x6D44,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6D47,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x3C34,0x935D,0x7C4C,0x6D46,0x6D45,0x375A,0x6D48,0x0000, + +/* 8F00h */ +0x935F,0x0000,0x0000,0x3353,0x0000,0x6D4A,0x0000,0x0000, +0x9360,0x3A5C,0x6D49,0x0000,0x6D52,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6D4C,0x6D4E,0x4A65,0x6D4B,0x0000,0x9361, +0x0000,0x6D4D,0x0000,0x6D51,0x6D4F,0x3531,0x7C4D,0x6D50, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6D53,0x0000, +0x0000,0x475A,0x4E58,0x9362,0x0000,0x7C4E,0x0000,0x3D34, +0x0000,0x0000,0x0000,0x6D54,0x0000,0x0000,0x7C4F,0x0000, +0x4D22,0x6D56,0x0000,0x6D55,0x0000,0x0000,0x6D59,0x4D41, +0x9363,0x0000,0x6D58,0x0000,0x336D,0x6D57,0x6D5C,0x0000, +0x0000,0x6D5B,0x9364,0x0000,0x6D5A,0x4532,0x6D5D,0x0000, +0x0000,0x0000,0x0000,0x0000,0x7C50,0x0000,0x0000,0x6D5E, +0x9365,0x0000,0x0000,0x0000,0x6D5F,0x0000,0x0000,0x396C, +0x0000,0x3725,0x6D60,0x6D61,0x6D62,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3F49,0x6D63,0x0000,0x3C2D,0x6D64, +0x0000,0x0000,0x0000,0x6D65,0x9367,0x0000,0x7C52,0x5221, +0x517E,0x0000,0x0000,0x0000,0x0000,0x6D66,0x6570,0x6D67, +0x4324,0x3F2B,0x4740,0x0000,0x9368,0x7C53,0x936A,0x6D68, +0x0000,0x0000,0x4A55,0x4454,0x397E,0x0000,0x0000,0x4329, +0x0000,0x936C,0x312A,0x0000,0x4B78,0x3F57,0x936D,0x0000, +0x0000,0x0000,0x936F,0x0000,0x0000,0x9370,0x375E,0x0000, +0x0000,0x3661,0x0000,0x9371,0x4A56,0x9372,0x0000,0x0000, +0x0000,0x0000,0x6D69,0x0000,0x0000,0x0000,0x0000,0x0000, +0x9373,0x0000,0x6D6B,0x0000,0x7C54,0x6D6A,0x3260,0x0000, +0x7C55,0x4676,0x6D6C,0x4777,0x0000,0x4533,0x7C56,0x6D6D, +0x3D52,0x9374,0x0000,0x0000,0x6D6F,0x9375,0x0000,0x4C42, +0x6D7E,0x6D71,0x6D72,0x9376,0x0000,0x4449,0x0000,0x0000, + +/* 9000h */ +0x4260,0x4177,0x9377,0x4628,0x0000,0x6D70,0x3555,0x0000, +0x7C57,0x0000,0x0000,0x6D79,0x9378,0x6D76,0x6E25,0x4629, +0x4360,0x6D73,0x0000,0x447E,0x4553,0x6D74,0x6D78,0x3F60, +0x0000,0x4767,0x444C,0x0000,0x0000,0x4042,0x6D77,0x422E, +0x4224,0x6D75,0x3029,0x4F22,0x0000,0x0000,0x0000,0x6D7A, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7C58,0x4261,0x0000, +0x0000,0x3D35,0x3F4A,0x0000,0x0000,0x6D7C,0x6D7B,0x9379, +0x306F,0x6D7D,0x0000,0x0000,0x492F,0x0000,0x6E27,0x0000, +0x0000,0x465B,0x3F6B,0x937B,0x937C,0x4359,0x0000,0x3678, +0x0000,0x6E26,0x4D37,0x313F,0x0000,0x4A57,0x3261,0x6E21, +0x6E22,0x6E23,0x6E24,0x463B,0x4323,0x3063,0x6E28,0x0000, +0x6E29,0x7423,0x0000,0x0000,0x423D,0x937D,0x6E2A,0x0000, +0x3173,0x414C,0x0000,0x382F,0x0000,0x4D5A,0x0000,0x0000, +0x6E2B,0x452C,0x0000,0x0000,0x0000,0x4178,0x3C57,0x6E2C, +0x0000,0x0000,0x6E2F,0x0000,0x0000,0x3D65,0x6E2D,0x412B, +0x412A,0x0000,0x3064,0x0000,0x4E4B,0x6E31,0x0000,0x4872, +0x6E33,0x6E32,0x6E30,0x6364,0x3454,0x9422,0x0000,0x6D6E, +0x7C5A,0x6E35,0x6E34,0x0000,0x9423,0x0000,0x0000,0x6E36, +0x9424,0x4D38,0x0000,0x0000,0x0000,0x7C5B,0x0000,0x7C5C, +0x0000,0x7C5D,0x0000,0x7C5E,0x0000,0x0000,0x0000,0x0000, +0x0000,0x9426,0x7C5F,0x4661,0x0000,0x0000,0x4B2E,0x0000, +0x6E37,0x0000,0x3C59,0x0000,0x0000,0x0000,0x0000,0x6E38, +0x9428,0x6E39,0x0000,0x7C60,0x0000,0x6E3A,0x9429,0x0000, +0x4521,0x0000,0x0000,0x0000,0x0000,0x0000,0x7C61,0x0000, +0x0000,0x306A,0x0000,0x942A,0x7C62,0x7C63,0x0000,0x7C64, +0x942B,0x0000,0x3959,0x0000,0x0000,0x0000,0x4F3A,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7C65, +0x0000,0x0000,0x0000,0x6E3E,0x942D,0x7C66,0x7C67,0x942E, +0x0000,0x3734,0x6E3B,0x0000,0x6E3C,0x0000,0x0000,0x0000, +0x4974,0x0000,0x0000,0x9433,0x0000,0x3354,0x0000,0x7C68, +0x0000,0x0000,0x9431,0x0000,0x7C69,0x4D39,0x9430,0x363F, +0x0000,0x0000,0x0000,0x0000,0x0000,0x4554,0x9434,0x9435, + +/* 9100h */ +0x9432,0x0000,0x6E3F,0x0000,0x9436,0x0000,0x9437,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6E40,0x0000,0x7C6B,0x7C6C,0x7C6D,0x0000, +0x9438,0x6E41,0x0000,0x0000,0x9439,0x0000,0x943A,0x0000, +0x0000,0x0000,0x7C6E,0x7C6F,0x0000,0x0000,0x0000,0x7C70, +0x0000,0x0000,0x0000,0x0000,0x0000,0x4522,0x0000,0x7C71, +0x6E43,0x7C72,0x6E42,0x0000,0x7C73,0x0000,0x0000,0x943B, +0x0000,0x943C,0x943D,0x0000,0x0000,0x7C74,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x943E,0x943F, +0x7C75,0x4653,0x6E44,0x3D36,0x3C60,0x475B,0x4371,0x0000, +0x0000,0x0000,0x3C72,0x0000,0x3F6C,0x0000,0x6E45,0x9440, +0x6E46,0x9441,0x0000,0x7C76,0x0000,0x0000,0x0000,0x0000, +0x0000,0x9442,0x3F5D,0x6E47,0x9443,0x6E48,0x0000,0x0000, +0x0000,0x6E49,0x4D6F,0x0000,0x3D37,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6E4B,0x6E4A,0x9444,0x395A,0x0000,0x3973, +0x3B40,0x9445,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6E4E,0x7C77,0x0000,0x9446,0x0000,0x3D66, +0x0000,0x6E4D,0x0000,0x6E4C,0x0000,0x4269,0x9447,0x0000, +0x386F,0x0000,0x4043,0x0000,0x0000,0x0000,0x0000,0x4830, +0x0000,0x0000,0x0000,0x0000,0x3D39,0x0000,0x7C78,0x0000, +0x0000,0x0000,0x6E4F,0x0000,0x3E5F,0x0000,0x0000,0x0000, +0x9448,0x0000,0x6E52,0x6E50,0x7C79,0x0000,0x9449,0x6E51, +0x0000,0x7C7A,0x0000,0x944A,0x6E54,0x6E53,0x944B,0x0000, +0x3E7A,0x0000,0x6E55,0x0000,0x7C7B,0x0000,0x0000,0x0000, +0x6E56,0x6E57,0x0000,0x944C,0x944D,0x0000,0x4850,0x3A53, +0x3C61,0x6E58,0x0000,0x6E59,0x4E24,0x3D45,0x4C6E,0x4E4C, +0x6E5A,0x3662,0x0000,0x0000,0x0000,0x0000,0x6E5B,0x7C7C, +0x4523,0x0000,0x944E,0x6E5E,0x3378,0x3F4B,0x0000,0x6E5C, +0x0000,0x6E5D,0x0000,0x4460,0x7C7E,0x7D21,0x4B55,0x367C, +0x0000,0x0000,0x0000,0x0000,0x9451,0x7D22,0x9452,0x0000, +0x0000,0x7D23,0x0000,0x0000,0x0000,0x6E60,0x6E61,0x0000, +0x0000,0x0000,0x0000,0x7C7D,0x6E5F,0x0000,0x0000,0x6E63, + +/* 9200h */ +0x0000,0x9453,0x0000,0x0000,0x0000,0x0000,0x0000,0x7D24, +0x0000,0x0000,0x9454,0x0000,0x0000,0x465F,0x3343,0x0000, +0x7D25,0x6E67,0x0000,0x0000,0x6E64,0x6E66,0x9455,0x9456, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6E62,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6F4F,0x0000,0x0000,0x6E65,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x9458,0x4E6B,0x0000,0x0000,0x385A, +0x7D26,0x7D27,0x7D28,0x0000,0x7D29,0x0000,0x0000,0x6E6F, +0x7D2A,0x0000,0x9459,0x7D2B,0x4534,0x6E6A,0x0000,0x945A, +0x6E6D,0x6E6B,0x945B,0x6E70,0x0000,0x0000,0x945C,0x7D2C, +0x6E71,0x945D,0x0000,0x0000,0x0000,0x0000,0x945E,0x6E69, +0x0000,0x945F,0x6E76,0x3174,0x0000,0x0000,0x6E68,0x0000, +0x9460,0x9461,0x482D,0x0000,0x6E6C,0x9462,0x3E60,0x9463, +0x9464,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x395B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7D2D,0x0000,0x0000,0x0000,0x9467,0x9468,0x4B48,0x9469, +0x3664,0x0000,0x0000,0x3D46,0x0000,0x463C,0x0000,0x0000, +0x7D2E,0x946A,0x0000,0x0000,0x0000,0x946B,0x0000,0x0000, +0x0000,0x412D,0x0000,0x6E74,0x0000,0x6E6E,0x6E73,0x946C, +0x4C43,0x946D,0x4438,0x6E75,0x6E72,0x0000,0x0000,0x946E, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x946F, +0x0000,0x0000,0x0000,0x9470,0x0000,0x412C,0x0000,0x0000, +0x0000,0x0000,0x9473,0x0000,0x0000,0x0000,0x0000,0x6E79, +0x0000,0x6E78,0x0000,0x0000,0x0000,0x0000,0x0000,0x9474, +0x9475,0x0000,0x7D2F,0x0000,0x0000,0x0000,0x9476,0x0000, +0x0000,0x0000,0x0000,0x7D30,0x7D31,0x0000,0x9477,0x6E77, +0x9478,0x0000,0x4B2F,0x7D32,0x0000,0x0000,0x0000,0x9479, +0x0000,0x947A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7D33,0x0000,0x0000,0x0000,0x3D7B,0x947B,0x0000,0x947C, +0x0000,0x6E7A,0x4A5F,0x0000,0x0000,0x3154,0x0000,0x0000, +0x0000,0x0000,0x4946,0x4372,0x0000,0x0000,0x0000,0x9522, +0x3578,0x9523,0x6E7C,0x9524,0x395D,0x0000,0x0000,0x7D34, + +/* 9300h */ +0x0000,0x0000,0x9525,0x0000,0x7D35,0x0000,0x3B2C,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x9526,0x0000,0x6E7B, +0x3F6D,0x947D,0x0000,0x0000,0x0000,0x9527,0x0000,0x0000, +0x3F6E,0x6F21,0x6F23,0x0000,0x0000,0x9528,0x9529,0x7D36, +0x3E7B,0x7D37,0x6F22,0x6F24,0x0000,0x7D38,0x3653,0x952A, +0x4945,0x952B,0x0000,0x3C62,0x4F23,0x0000,0x6E7E,0x3A78, +0x0000,0x0000,0x4F3F,0x0000,0x0000,0x6F26,0x0000,0x0000, +0x0000,0x0000,0x6F25,0x6F27,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x6E7D,0x0000,0x0000,0x952E, +0x7D39,0x7D3A,0x7D3B,0x4669,0x0000,0x4555,0x0000,0x0000, +0x0000,0x952F,0x0000,0x0000,0x4457,0x0000,0x6F2C,0x9530, +0x0000,0x0000,0x9531,0x4343,0x6F28,0x0000,0x0000,0x0000, +0x6F29,0x0000,0x0000,0x0000,0x7D3C,0x7D3D,0x0000,0x0000, +0x0000,0x0000,0x7D3E,0x9532,0x372D,0x0000,0x6F2B,0x0000, +0x7D3F,0x9533,0x0000,0x9534,0x0000,0x3830,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x6F2A,0x0000,0x3E61,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x9538,0x0000,0x0000,0x9539,0x3379,0x0000,0x0000,0x953A, +0x0000,0x0000,0x0000,0x0000,0x6F30,0x0000,0x3A3F,0x4179, +0x0000,0x0000,0x444A,0x7D40,0x0000,0x0000,0x953B,0x0000, +0x0000,0x9535,0x0000,0x7D41,0x0000,0x0000,0x0000,0x333B, +0x0000,0x0000,0x0000,0x0000,0x6F2E,0x6F2F,0x4443,0x0000, +0x6F2D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6F31,0x7D42,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x9540,0x0000,0x6F37,0x0000,0x0000,0x7D43,0x9541, +0x6F3A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6F39,0x452D,0x0000,0x0000,0x0000,0x0000,0x6F32,0x6F33, +0x6F36,0x0000,0x0000,0x0000,0x9542,0x6F38,0x7D44,0x7D45, +0x0000,0x3640,0x9543,0x0000,0x6F3B,0x6F35,0x0000,0x9544, +0x6F34,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x953F,0x0000,0x0000,0x0000,0x953C,0x0000,0x0000, +0x0000,0x0000,0x0000,0x9549,0x0000,0x7D47,0x0000,0x0000, + +/* 9400h */ +0x0000,0x0000,0x0000,0x6F3F,0x7D46,0x0000,0x0000,0x6F40, +0x0000,0x9545,0x0000,0x0000,0x0000,0x0000,0x0000,0x9546, +0x6F41,0x0000,0x0000,0x6F3E,0x6F3D,0x0000,0x9547,0x9548, +0x3E62,0x462A,0x6F3C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6F45,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6F43,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x954A,0x7D48,0x954B,0x6F44,0x6F42,0x0000, +0x4278,0x0000,0x6F46,0x954C,0x0000,0x0000,0x0000,0x0000, +0x0000,0x6F47,0x0000,0x0000,0x6F49,0x954D,0x0000,0x0000, +0x0000,0x0000,0x7D49,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x3455,0x6F48,0x4C7A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6F54,0x6F4A,0x0000,0x0000,0x6F4D,0x0000, +0x6F4B,0x0000,0x6F4C,0x7D4A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x6F4E,0x7D4B,0x0000,0x9550,0x0000,0x9551, +0x6F50,0x7D4C,0x7D4D,0x0000,0x0000,0x6F51,0x0000,0x6F52, +0x0000,0x0000,0x0000,0x0000,0x6F55,0x6F53,0x6F56,0x6F58, +0x0000,0x6F57,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 9500h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4439, +0x9552,0x9553,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4C67,0x0000,0x6F59,0x412E,0x0000,0x0000,0x9554,0x6F5A, +0x0000,0x4A44,0x6F5B,0x332B,0x9555,0x9556,0x7D4E,0x313C, +0x0000,0x3457,0x0000,0x3456,0x6F5C,0x0000,0x6F5D,0x0000, +0x6F5E,0x6F5F,0x0000,0x0000,0x0000,0x0000,0x0000,0x7D4F, +0x6F60,0x0000,0x3458,0x3355,0x395E,0x4836,0x7D50,0x6F62, +0x6F61,0x7D51,0x0000,0x9558,0x7D52,0x6F63,0x0000,0x0000, +0x0000,0x0000,0x315C,0x0000,0x9559,0x0000,0x7D53,0x0000, +0x0000,0x6F66,0x0000,0x6F65,0x6F64,0x7D54,0x6F67,0x0000, +0x0000,0x0000,0x0000,0x6F6A,0x0000,0x0000,0x0000,0x3047, +0x955B,0x0000,0x6F68,0x7D55,0x6F6C,0x6F6B,0x0000,0x0000, +0x7D56,0x0000,0x0000,0x7D57,0x6F6E,0x6F6D,0x6F6F,0x0000, +0x462E,0x0000,0x7D59,0x0000,0x6F70,0x0000,0x7D5A,0x0000, +0x0000,0x6F71,0x6F73,0x0000,0x0000,0x6F72,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 9600h */ +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x496C,0x9425,0x0000,0x0000, +0x0000,0x6F74,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x6F75,0x0000,0x3A65,0x0000,0x955E,0x0000,0x6F76,0x6F77, +0x0000,0x0000,0x4B49,0x955F,0x9560,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x414B,0x9562,0x0000,0x0000,0x3024, +0x424B,0x9563,0x6F78,0x0000,0x496D,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6F7B,0x6F79,0x395F,0x0000,0x6F7A, +0x3842,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7D5B,0x0000,0x0000,0x4A45,0x6F7D,0x7021,0x6F7E,0x7022, +0x0000,0x9564,0x3121,0x3F58,0x3D7C,0x3459,0x7023,0x0000, +0x0000,0x0000,0x4766,0x0000,0x7025,0x0000,0x0000,0x0000, +0x3122,0x0000,0x7024,0x4444,0x0000,0x4E4D,0x462B,0x6F7C, +0x4E26,0x0000,0x3831,0x0000,0x0000,0x4D5B,0x0000,0x0000, +0x0000,0x0000,0x9566,0x0000,0x7D5C,0x3679,0x4E34,0x0000, +0x3728,0x0000,0x4262,0x6721,0x0000,0x7026,0x332C,0x3F6F, +0x0000,0x0000,0x0000,0x0000,0x3356,0x7028,0x0000,0x7029, +0x7027,0x3764,0x9568,0x3A5D,0x3E63,0x7D5E,0x0000,0x0000, +0x3123,0x0000,0x0000,0x4E59,0x7D5F,0x7D60,0x0000,0x702B, +0x6E2E,0x956B,0x702A,0x0000,0x0000,0x0000,0x0000,0x956C, +0x702E,0x702C,0x702D,0x956D,0x702F,0x0000,0x7030,0x4E6C, +0x7031,0x7032,0x956E,0x4049,0x483B,0x956F,0x0000,0x0000, +0x3F7D,0x3467,0x0000,0x0000,0x4D3A,0x326D,0x3D38,0x385B, +0x0000,0x7035,0x0000,0x7034,0x3B73,0x7036,0x7033,0x0000, +0x0000,0x3B28,0x7D61,0x0000,0x0000,0x703A,0x6A2D,0x0000, +0x9572,0x5256,0x9573,0x3F77,0x7038,0x9574,0x7D62,0x0000, +0x0000,0x0000,0x4E25,0x4671,0x0000,0x0000,0x0000,0x0000, +0x312B,0x7D64,0x4063,0x3C36,0x0000,0x0000,0x0000,0x7D65, +0x4A37,0x0000,0x3140,0x0000,0x0000,0x0000,0x4E6D,0x4D6B, +0x0000,0x703B,0x0000,0x4545,0x0000,0x0000,0x0000,0x0000, + +/* 9700h */ +0x3C7B,0x0000,0x0000,0x0000,0x703C,0x0000,0x703D,0x3F4C, +0x703E,0x0000,0x4E6E,0x0000,0x0000,0x7039,0x7040,0x7042, +0x0000,0x7041,0x0000,0x703F,0x9576,0x0000,0x7043,0x0000, +0x0000,0x7044,0x0000,0x0000,0x417A,0x0000,0x3262,0x0000, +0x0000,0x0000,0x0000,0x9577,0x7045,0x0000,0x0000,0x4C38, +0x0000,0x0000,0x7046,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7047,0x0000,0x4F2A,0x7D66,0x0000,0x0000,0x9579,0x0000, +0x5B31,0x7048,0x0000,0x7D67,0x0000,0x7049,0x704A,0x0000, +0x0000,0x957A,0x704E,0x0000,0x704B,0x0000,0x704C,0x957B, +0x704D,0x704F,0x0000,0x0000,0x0000,0x7D68,0x7D69,0x7D6A, +0x0000,0x0000,0x4044,0x0000,0x0000,0x957C,0x4C77,0x957D, +0x0000,0x4045,0x7D6B,0x957E,0x7050,0x0000,0x4873,0x0000, +0x7051,0x7353,0x4C4C,0x0000,0x7052,0x0000,0x7053,0x0000, +0x7054,0x3357,0x9621,0x7056,0x0000,0x3F59,0x7D6C,0x0000, +0x0000,0x7057,0x0000,0x7D6D,0x3724,0x0000,0x0000,0x0000, +0x0000,0x7058,0x705C,0x0000,0x705A,0x0000,0x0000,0x0000, +0x0000,0x705B,0x0000,0x0000,0x3373,0x7059,0x705D,0x0000, +0x0000,0x0000,0x0000,0x705E,0x0000,0x3048,0x0000,0x705F, +0x7060,0x0000,0x0000,0x0000,0x0000,0x7D6E,0x9624,0x0000, +0x3E64,0x0000,0x9625,0x0000,0x7061,0x0000,0x9626,0x0000, +0x3547,0x0000,0x9627,0x7064,0x0000,0x0000,0x7063,0x0000, +0x7062,0x0000,0x0000,0x6B71,0x0000,0x4A5C,0x7D6F,0x0000, +0x0000,0x9628,0x9629,0x7065,0x7066,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7D70,0x0000,0x0000,0x0000,0x962A,0x0000, +0x0000,0x7D71,0x0000,0x7067,0x0000,0x0000,0x7068,0x0000, +0x7069,0x7D72,0x0000,0x706A,0x962B,0x0000,0x0000,0x0000, +0x0000,0x962C,0x0000,0x345A,0x962D,0x0000,0x0000,0x0000, +0x962E,0x962F,0x0000,0x7D74,0x706B,0x0000,0x7D73,0x0000, +0x0000,0x9630,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x706C,0x4723,0x0000, +0x0000,0x9631,0x706E,0x323B,0x7D75,0x7071,0x7070,0x0000, +0x0000,0x0000,0x0000,0x3124,0x0000,0x0000,0x0000,0x3641, + +/* 9800h */ +0x0000,0x4A47,0x443A,0x3A22,0x9632,0x3960,0x3D67,0x0000, +0x3F5C,0x0000,0x7D77,0x0000,0x7073,0x9633,0x9634,0x7072, +0x4D42,0x3468,0x4852,0x465C,0x9635,0x0000,0x9636,0x3F7C, +0x4E4E,0x0000,0x375B,0x0000,0x0000,0x0000,0x7D78,0x0000, +0x0000,0x7076,0x0000,0x9639,0x7075,0x963C,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7D79,0x4B4B,0x462C,0x0000,0x0000, +0x7D7A,0x0000,0x963A,0x963B,0x3150,0x0000,0x0000,0x7077, +0x7074,0x0000,0x0000,0x4951,0x4D6A,0x7078,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7079,0x963D, +0x0000,0x0000,0x0000,0x707B,0x426A,0x335B,0x335C,0x707A, +0x0000,0x0000,0x7D7C,0x7D7D,0x3469,0x3832,0x7D7E,0x7E21, +0x346A,0x7E22,0x7E23,0x453F,0x0000,0x0000,0x4E60,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7E25,0x963E,0x385C, +0x0000,0x0000,0x0000,0x707C,0x7E26,0x0000,0x0000,0x707D, +0x707E,0x7121,0x0000,0x7123,0x7122,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4977,0x0000,0x7124,0x963F,0x0000,0x9640,0x0000,0x7125, +0x9641,0x7126,0x0000,0x0000,0x0000,0x0000,0x7127,0x9643, +0x9644,0x0000,0x7E27,0x9645,0x9646,0x0000,0x0000,0x9647, +0x0000,0x0000,0x9648,0x7129,0x7128,0x0000,0x712A,0x9649, +0x7E28,0x0000,0x0000,0x964A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x4874,0x664C,0x0000,0x0000,0x3F29, +0x964B,0x964D,0x3532,0x964E,0x0000,0x964F,0x0000,0x7E29, +0x0000,0x712B,0x9650,0x712C,0x0000,0x522C,0x5D3B,0x4853, +0x9651,0x9652,0x307B,0x9653,0x303B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x3B74,0x4B30,0x3E7E,0x0000, + +/* 9900h */ +0x0000,0x0000,0x0000,0x712D,0x0000,0x4C5F,0x0000,0x0000, +0x9654,0x712E,0x4D5C,0x0000,0x3142,0x0000,0x0000,0x0000, +0x3B41,0x0000,0x712F,0x326E,0x7130,0x0000,0x9657,0x9658, +0x7131,0x0000,0x965A,0x965B,0x965C,0x7133,0x7134,0x0000, +0x7136,0x7132,0x0000,0x0000,0x7135,0x0000,0x0000,0x0000, +0x345B,0x0000,0x0000,0x0000,0x7137,0x0000,0x7138,0x0000, +0x0000,0x965E,0x965F,0x9660,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x9661,0x9662,0x9663,0x7139,0x713A,0x0000, +0x9664,0x9665,0x713B,0x0000,0x0000,0x713D,0x9666,0x0000, +0x0000,0x713C,0x0000,0x713F,0x7142,0x9667,0x9668,0x0000, +0x713E,0x7140,0x7141,0x0000,0x0000,0x7143,0x0000,0x3642, +0x7E2A,0x0000,0x0000,0x0000,0x9669,0x0000,0x0000,0x966A, +0x966B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3C73,0x7144, +0x7145,0x3961,0x0000,0x0000,0x0000,0x0000,0x7E2B,0x0000, +0x0000,0x0000,0x0000,0x966C,0x0000,0x7146,0x966D,0x0000, +0x333E,0x0000,0x0000,0x0000,0x474F,0x7147,0x7148,0x0000, +0x0000,0x0000,0x0000,0x435A,0x466B,0x0000,0x0000,0x0000, +0x0000,0x966E,0x0000,0x0000,0x7149,0x966F,0x0000,0x9670, +0x0000,0x477D,0x0000,0x9671,0x424C,0x3158,0x366E,0x0000, +0x366F,0x9672,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x4373,0x714E,0x3670,0x0000,0x9673,0x326F,0x0000,0x0000, +0x714D,0x9674,0x0000,0x714B,0x0000,0x714C,0x9675,0x714A, +0x0000,0x0000,0x7158,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x714F,0x7150,0x0000, +0x9677,0x7151,0x7152,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7154,0x9678,0x0000,0x7153,0x9679,0x0000,0x0000,0x3D59, + +/* 9A00h */ +0x0000,0x7155,0x7E2C,0x7E2D,0x0000,0x7157,0x0000,0x0000, +0x0000,0x0000,0x967A,0x0000,0x0000,0x0000,0x3533,0x7156, +0x0000,0x967B,0x417B,0x3833,0x0000,0x0000,0x967C,0x0000, +0x0000,0x7159,0x967D,0x0000,0x0000,0x0000,0x0000,0x0000, +0x967E,0x0000,0x0000,0x0000,0x7E2E,0x0000,0x0000,0x0000, +0x424D,0x0000,0x0000,0x715A,0x0000,0x7E2F,0x7E30,0x0000, +0x462D,0x9721,0x0000,0x0000,0x0000,0x0000,0x9722,0x715B, +0x7E31,0x0000,0x0000,0x0000,0x0000,0x0000,0x7160,0x0000, +0x715E,0x0000,0x715D,0x715F,0x9723,0x715C,0x0000,0x0000, +0x0000,0x0000,0x7E32,0x0000,0x9724,0x7162,0x7E33,0x0000, +0x0000,0x0000,0x7E34,0x0000,0x0000,0x7161,0x0000,0x7164, +0x9725,0x0000,0x3643,0x7163,0x0000,0x0000,0x0000,0x7165, +0x0000,0x0000,0x7166,0x0000,0x7168,0x7167,0x0000,0x0000, +0x0000,0x7169,0x716B,0x716A,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x397C,0x0000,0x0000,0x0000,0x0000,0x716C,0x0000,0x9727, +0x716D,0x0000,0x0000,0x0000,0x0000,0x0000,0x7E35,0x9729, +0x333C,0x972B,0x0000,0x0000,0x716E,0x0000,0x0000,0x0000, +0x716F,0x7E36,0x0000,0x7E37,0x3F71,0x0000,0x972D,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7E38,0x7170, +0x972E,0x7171,0x972F,0x7172,0x7173,0x9730,0x7E39,0x0000, +0x3962,0x0000,0x0000,0x0000,0x9732,0x0000,0x7174,0x7175, +0x9733,0x0000,0x7176,0x7177,0x0000,0x9734,0x7178,0x0000, +0x0000,0x9735,0x4831,0x717A,0x0000,0x4926,0x717B,0x7179, +0x0000,0x717D,0x0000,0x0000,0x717C,0x0000,0x0000,0x717E, +0x0000,0x7E3A,0x0000,0x7221,0x0000,0x0000,0x0000,0x0000, + +/* 9B00h */ +0x0000,0x0000,0x7E3B,0x9736,0x0000,0x0000,0x7222,0x0000, +0x7E3C,0x0000,0x0000,0x0000,0x9737,0x0000,0x0000,0x0000, +0x9738,0x0000,0x9739,0x0000,0x0000,0x0000,0x973A,0x0000, +0x7223,0x0000,0x7224,0x0000,0x973B,0x0000,0x0000,0x7225, +0x7E3D,0x0000,0x7226,0x7227,0x0000,0x7228,0x0000,0x7229, +0x722A,0x722B,0x722C,0x973C,0x0000,0x7E3F,0x722D,0x722E, +0x0000,0x5D35,0x722F,0x973D,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x6478,0x3534,0x973E,0x0000,0x0000, +0x0000,0x3321,0x3A32,0x7231,0x7230,0x4C25,0x0000,0x0000, +0x0000,0x0000,0x0000,0x9740,0x0000,0x7233,0x7234,0x7232, +0x0000,0x7235,0x0000,0x0000,0x4B62,0x0000,0x0000,0x0000, +0x7236,0x0000,0x357B,0x0000,0x0000,0x0000,0x7E40,0x0000, +0x0000,0x0000,0x0000,0x9741,0x0000,0x9742,0x7E42,0x0000, +0x0000,0x0000,0x0000,0x9743,0x9744,0x0000,0x0000,0x4F25, +0x0000,0x0000,0x7E43,0x9745,0x7237,0x7E44,0x9746,0x9747, +0x0000,0x7E41,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x7239,0x7E45,0x0000,0x0000,0x0000, +0x0000,0x0000,0x7E46,0x0000,0x0000,0x0000,0x303E,0x7E47, +0x0000,0x723A,0x4A2B,0x7238,0x0000,0x0000,0x723B,0x723C, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7E48,0x723D, +0x723E,0x0000,0x0000,0x0000,0x0000,0x0000,0x9748,0x7E49, +0x723F,0x0000,0x4B6E,0x3B2D,0x9749,0x3A7A,0x412F,0x0000, +0x0000,0x974A,0x974D,0x0000,0x7240,0x0000,0x0000,0x0000, +0x974E,0x7243,0x0000,0x0000,0x0000,0x0000,0x974F,0x0000, +0x7241,0x7E4A,0x0000,0x0000,0x0000,0x0000,0x7244,0x9750, +0x0000,0x3871,0x7242,0x0000,0x0000,0x0000,0x7E4B,0x7245, +0x0000,0x7246,0x7247,0x0000,0x724B,0x0000,0x3B2A,0x0000, +0x9752,0x0000,0x0000,0x4264,0x0000,0x9753,0x0000,0x0000, +0x0000,0x724C,0x7249,0x7248,0x724A,0x7E4C,0x0000,0x9754, +0x375F,0x0000,0x9755,0x9756,0x0000,0x0000,0x9758,0x9757, +0x7250,0x724F,0x724E,0x9751,0x0000,0x3033,0x0000,0x975C, +0x7E4D,0x0000,0x975A,0x0000,0x0000,0x7E4E,0x0000,0x0000, + +/* 9C00h */ +0x7E4F,0x0000,0x0000,0x0000,0x725A,0x0000,0x7256,0x0000, +0x7257,0x7253,0x7259,0x0000,0x7255,0x3362,0x0000,0x0000, +0x4F4C,0x0000,0x7258,0x7254,0x7252,0x7251,0x975E,0x0000, +0x975F,0x9760,0x9761,0x725C,0x0000,0x9762,0x0000,0x0000, +0x0000,0x725F,0x9763,0x7E50,0x725E,0x725D,0x0000,0x9764, +0x0000,0x9765,0x9766,0x0000,0x0000,0x4949,0x725B,0x3073, +0x7260,0x9768,0x7262,0x0000,0x0000,0x0000,0x9769,0x976A, +0x0000,0x336F,0x724D,0x3137,0x0000,0x0000,0x7264,0x0000, +0x0000,0x7E51,0x0000,0x0000,0x0000,0x976B,0x7263,0x7261, +0x432D,0x976E,0x976F,0x0000,0x0000,0x0000,0x0000,0x7E52, +0x7E53,0x0000,0x4B70,0x7E54,0x9771,0x0000,0x0000,0x4E5A, +0x9772,0x0000,0x7265,0x9773,0x976C,0x9774,0x0000,0x9775, +0x7266,0x0000,0x0000,0x7E55,0x0000,0x7E56,0x0000,0x7267, +0x0000,0x9776,0x9777,0x9778,0x0000,0x9779,0x977A,0x0000, +0x977B,0x0000,0x977C,0x0000,0x0000,0x977D,0x7268,0x7E57, +0x7269,0x0000,0x977E,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x443B,0x9821,0x726A, +0x0000,0x4837,0x0000,0x726F,0x726B,0x0000,0x0000,0x0000, +0x726C,0x0000,0x9822,0x4B31,0x4C44,0x0000,0x4650,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + +/* 9D00h */ +0x0000,0x0000,0x9824,0x7270,0x0000,0x0000,0x7271,0x463E, +0x726E,0x726D,0x0000,0x9823,0x0000,0x0000,0x322A,0x0000, +0x0000,0x9826,0x7279,0x0000,0x0000,0x7278,0x0000,0x9827, +0x9828,0x0000,0x0000,0x3175,0x0000,0x7E58,0x7E59,0x7276, +0x0000,0x0000,0x0000,0x7275,0x0000,0x0000,0x7273,0x0000, +0x337B,0x0000,0x7272,0x3C32,0x3229,0x0000,0x0000,0x0000, +0x0000,0x0000,0x982C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x3963,0x0000,0x0000,0x727C,0x727B, +0x0000,0x727A,0x982E,0x7E5A,0x7277,0x0000,0x727D,0x7E5B, +0x727E,0x0000,0x982F,0x0000,0x0000,0x0000,0x0000,0x0000, +0x7325,0x7324,0x7E5C,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x7326,0x0000,0x0000,0x312D,0x7321,0x7322,0x9830, +0x3974,0x4C39,0x9831,0x7E5D,0x7323,0x0000,0x0000,0x0000, +0x0000,0x9833,0x0000,0x9834,0x4B32,0x0000,0x0000,0x732B, +0x7E5E,0x0000,0x7327,0x9836,0x0000,0x0000,0x9837,0x9838, +0x0000,0x0000,0x732C,0x0000,0x7E5F,0x0000,0x9839,0x0000, +0x0000,0x0000,0x0000,0x0000,0x983A,0x0000,0x0000,0x7329, +0x0000,0x7328,0x7E60,0x0000,0x0000,0x983B,0x0000,0x375C, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7E61,0x0000, +0x0000,0x983C,0x732D,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x983D,0x0000,0x0000,0x732E,0x0000,0x0000,0x0000, +0x0000,0x732F,0x0000,0x732A,0x7E63,0x0000,0x0000,0x7274, +0x0000,0x0000,0x7330,0x0000,0x4461,0x983F,0x0000,0x0000, +0x7334,0x9840,0x7335,0x7333,0x7E64,0x9841,0x0000,0x983E, +0x7E62,0x7332,0x7338,0x9842,0x7331,0x0000,0x7336,0x9843, +0x0000,0x9844,0x0000,0x0000,0x0000,0x0000,0x0000,0x7337, +0x0000,0x0000,0x0000,0x733A,0x0000,0x0000,0x9845,0x7E65, +0x0000,0x7339,0x9846,0x0000,0x0000,0x0000,0x0000,0x9847, +0x9848,0x0000,0x0000,0x9849,0x0000,0x0000,0x733C,0x7E67, +0x0000,0x0000,0x0000,0x0000,0x0000,0x733D,0x0000,0x733E, +0x0000,0x0000,0x4F49,0x0000,0x984A,0x0000,0x0000,0x0000, +0x733B,0x426B,0x3A6D,0x0000,0x0000,0x733F,0x0000,0x0000, + +/* 9E00h */ +0x0000,0x0000,0x984D,0x0000,0x0000,0x0000,0x0000,0x7E68, +0x0000,0x0000,0x984C,0x0000,0x0000,0x984E,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7E69,0x0000,0x0000, +0x0000,0x984F,0x7340,0x7341,0x9850,0x9851,0x7342,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x7343,0x0000,0x0000, +0x3834,0x7344,0x0000,0x9852,0x7E6A,0x7345,0x0000,0x3C2F, +0x9854,0x7346,0x0000,0x0000,0x0000,0x9855,0x0000,0x0000, +0x7347,0x0000,0x0000,0x7348,0x7349,0x0000,0x0000,0x0000, +0x0000,0x734C,0x734A,0x4F3C,0x0000,0x734B,0x0000,0x4E6F, +0x0000,0x0000,0x0000,0x9856,0x0000,0x734D,0x7E6B,0x4E5B, +0x0000,0x0000,0x0000,0x0000,0x7E6C,0x734E,0x477E,0x0000, +0x9857,0x734F,0x7351,0x0000,0x7E6D,0x7352,0x0000,0x7E6E, +0x0000,0x0000,0x0000,0x0000,0x7E6F,0x7E70,0x0000,0x0000, +0x7350,0x396D,0x4C4D,0x4B63,0x5677,0x9859,0x5D60,0x4B7B, +0x0000,0x0000,0x0000,0x7E71,0x322B,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x7354,0x3550,0x7355,0x7356, +0x7357,0x7E72,0x3975,0x0000,0x7358,0x0000,0x0000,0x0000, +0x6054,0x4C5B,0x0000,0x4263,0x7359,0x735B,0x735A,0x985B, +0x735C,0x0000,0x0000,0x0000,0x0000,0x735D,0x0000,0x985C, +0x735E,0x0000,0x0000,0x0000,0x0000,0x0000,0x985D,0x735F, +0x0000,0x0000,0x0000,0x0000,0x7360,0x0000,0x7361,0x7362, +0x0000,0x7363,0x0000,0x7364,0x7365,0x7366,0x0000,0x985E, + +/* 9F00h */ +0x0000,0x0000,0x985F,0x9861,0x0000,0x0000,0x0000,0x7367, +0x7368,0x0000,0x0000,0x0000,0x0000,0x0000,0x4524,0x0000, +0x7E73,0x0000,0x0000,0x385D,0x0000,0x736A,0x0000,0x9862, +0x0000,0x9863,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x414D,0x736B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x736C,0x0000,0x0000,0x9864, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9865, +0x0000,0x7E74,0x9866,0x4921,0x0000,0x9867,0x736D,0x0000, +0x0000,0x9868,0x0000,0x0000,0x0000,0x9869,0x986A,0x0000, +0x0000,0x0000,0x736E,0x6337,0x0000,0x0000,0x6C5A,0x706D, +0x0000,0x0000,0x736F,0x986B,0x7370,0x986C,0x0000,0x7E75, +0x986D,0x0000,0x0000,0x0000,0x0000,0x986F,0x0000,0x7372, +0x7373,0x7374,0x4E70,0x7371,0x0000,0x0000,0x7375,0x7376, +0x0000,0x9871,0x7378,0x0000,0x7377,0x9873,0x0000,0x0000, +0x9874,0x0000,0x737A,0x0000,0x0000,0x9875,0x737B,0x7379, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x4E36,0x0000,0x0000, +0x7E76,0x0000,0x0000,0x0000,0x7E77,0x737C,0x0000,0x7E78, +0x0000,0x0000,0x0000,0x0000,0x737D,0x6354,0x0000,0x0000, +0x737E,0x0000,0x7E79,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +}; + +static const int ucs_i_jisx0213_table_min = 0x4E00; +static const int ucs_i_jisx0213_table_max = 0x4E00 + (sizeof(ucs_i_jisx0213_table)/ + sizeof(unsigned short)); + +/* Halfwidth and Fullwidth Forms */ +static const unsigned short ucs_r_jisx0213_table[] = { // 0xff00 - 0xffe5 + +/* FF00h */ +0x0000,0x212A,0x2230,0x2174,0x2170,0x2173,0x2175,0x222F, +0x214A,0x214B,0x2176,0x215C,0x2124,0x2231,0x2125,0x213F, +0x2330,0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337, +0x2338,0x2339,0x2127,0x2128,0x2163,0x2161,0x2164,0x2129, +0x2177,0x2341,0x2342,0x2343,0x2344,0x2345,0x2346,0x2347, +0x2348,0x2349,0x234A,0x234B,0x234C,0x234D,0x234E,0x234F, +0x2350,0x2351,0x2352,0x2353,0x2354,0x2355,0x2356,0x2357, +0x2358,0x2359,0x235A,0x214E,0x2140,0x214F,0x2130,0x2132, +0x212E,0x2361,0x2362,0x2363,0x2364,0x2365,0x2366,0x2367, +0x2368,0x2369,0x236A,0x236B,0x236C,0x236D,0x236E,0x236F, +0x2370,0x2371,0x2372,0x2373,0x2374,0x2375,0x2376,0x2377, +0x2378,0x2379,0x237A,0x2150,0x2143,0x2151,0x2232,0x2256, +0x2257,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, +0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, +0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, +0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, +0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, +0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, +0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, +0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x0000,0x0000,0x0000,0x2131,0x0000,0x216F,}; + +static const int ucs_r_jisx0213_table_min = 0xFF00; +static const int ucs_r_jisx0213_table_max = 0xFF00 + (sizeof(ucs_r_jisx0213_table)/ + sizeof(unsigned short)); + +/* CJK Compatibility Ideographs : U+F900 - U+FAFF */ +static const unsigned short ucs_r2_jisx0213_table[] = { // 0xfa0f - 0xfa6a +0x2F4B, +0x2F57,0x4F72,0x0000,0x8679,0x757A,0x775A,0x776F,0x0000, +0x0000,0x793C,0x793D,0x7941,0x0000,0x0000,0x0000,0x7B3A, +0x9138,0x9145,0x7C2E,0x0000,0x936E,0x0000,0x7C6A,0x0000, +0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, +0x2E38,0x2E49,0x2E50,0x2E63,0x2E68,0x2E6E,0x2F2C,0x2F2F, +0x2F36,0x2F5A,0x2F5E,0x4F61,0x4F62,0x7450,0x745C,0x745E, +0x7461,0x7528,0x752B,0x7543,0x7565,0x7669,0x7677,0x7725, +0x7755,0x8A29,0x7825,0x7927,0x7933,0x7934,0x7937,0x7938, +0x7939,0x793B,0x793F,0x7940,0x794D,0x7951,0x7964,0x7A2E, +0x8E50,0x7A33,0x7A3A,0x7A44,0x7A58,0x8F74,0x8F75,0x7B27, +0x7B6F,0x7B79,0x7C2F,0x7C30,0x7C38,0x7C3D,0x9369,0x7C59, +0x7D63,0x7D76,0x7D7B,}; + +static const int ucs_r2_jisx0213_min = 0xFA0F; +static const int ucs_r2_jisx0213_max = 0xFA6A; + +/* + CJK Compatibility Ideographs: U+F900 - U+FAFF (seperate mapping for U+F9XX) +*/ +static const unsigned short ucs_r2b_jisx0213_cmap_key[] = { + 0xf91d,0xf928,0xf929,0xf936,0xf970,0xf9d0,0xf9dc}; + +static const unsigned short ucs_r2b_jisx0213_cmap_val[] = { + 0x763b,0x742e,0x754e,0x7b4f,0x7649,0x7e24,0x7d5d}; + +static const int ucs_r2b_jisx0213_cmap_len = + sizeof(ucs_r2b_jisx0213_cmap_key)/sizeof(unsigned short); + +/* + U+1E00 - U+4DBF in compresed mapping + + Latin Extended Additional: U+1E00 - U+1EFF + Greek Extended: U+1F00 - U+1FFF + General Punctuation: U+2000 - U+206F + Currency Symbols U+20A0 - U+20CF + Combining Diacritical Marks for Symbols: U+20D0 - 20FF + Number Forms: U+2150 - U+218F + Arrow : U+2190 - U+21FF + Mathematical Operations : U+2200 - U+22FF + Miscellaneous Technical : U+2300 - U+23FF + Enclosed Alphanumerics : U+2460 - U+24FF + Box Drawing: U+2500 - U+257F + Geometric Shapes: U+25A0 - U+25FF + Miscellanuous Symbols : U+2600 - U+26FF + Digbats : U+2700 - U+27BF + Supplemental Arrows-B: U+2900 - U+297F + Miscellaneous Mathematical Symbols-B: U+2980 - U+29FF + CJK Symbols and Punctution: U+3000 - U+303F + Hiragana (*1) : U+3040 - U+309F + Katakana (*1): U+30A0 - U+30FF + CJK Strokes: U+31C0-31EF + Katakana Phonetic Extensions : U+31F0 - U+31FF + CJK Unified Ideographs Extension A: U+3400 - U+4DBF + + *1 U+3000 - U+30FF is also defined in ucs_hk to optimize for speed. + */ +static const unsigned short ucs_c1_jisx0213_tbl[] = { // 0x1e00 - 0x4dff +0x1E3E,0x1E3F,0x1F70,0x1F71,0x1F72,0x1F73,0x2010,0x2010, +0x2013,0x2013,0x2014,0x2014,0x2016,0x2016,0x2018,0x2019, +0x201C,0x201D,0x2020,0x2021,0x2022,0x2022,0x2025,0x2025, +0x2026,0x2026,0x2030,0x2030,0x2032,0x2033,0x203B,0x203B, +0x203C,0x203C,0x203E,0x203E,0x203F,0x203F,0x2042,0x2042, +0x2047,0x2049,0x2051,0x2051,0x20AC,0x20AC,0x2103,0x2103, +0x210F,0x210F,0x2113,0x2113,0x2116,0x2116,0x2121,0x2121, +0x2127,0x2127,0x212B,0x212B,0x2135,0x2135,0x2153,0x2155, +0x2160,0x216A,0x216B,0x216B,0x2170,0x217B,0x2190,0x2191, +0x2192,0x2192,0x2193,0x2193,0x2194,0x2194,0x2196,0x2196, +0x2197,0x2198,0x2199,0x2199,0x21C4,0x21C4,0x21D2,0x21D2, +0x21D4,0x21D4,0x21E6,0x21E7,0x21E8,0x21E8,0x21E9,0x21E9, +0x2200,0x2200,0x2202,0x2202,0x2203,0x2203,0x2205,0x2205, +0x2207,0x2207,0x2208,0x2208,0x2209,0x2209,0x220B,0x220B, +0x2212,0x2212,0x2213,0x2213,0x221A,0x221A,0x221D,0x221D, +0x221E,0x221E,0x221F,0x221F,0x2220,0x2220,0x2225,0x2226, +0x2227,0x2228,0x2229,0x2229,0x222A,0x222A,0x222B,0x222C, +0x222E,0x222E,0x2234,0x2234,0x2235,0x2235,0x223D,0x223D, +0x2243,0x2243,0x2245,0x2245,0x2248,0x2248,0x2252,0x2252, +0x2260,0x2260,0x2261,0x2261,0x2262,0x2262,0x2266,0x2267, +0x226A,0x226B,0x2276,0x2277,0x2282,0x2283,0x2284,0x2285, +0x2286,0x2287,0x228A,0x228B,0x2295,0x2297,0x22A5,0x22A5, +0x22BF,0x22BF,0x22DA,0x22DB,0x2305,0x2306,0x2312,0x2312, +0x2318,0x2318,0x23BE,0x23CC,0x23CE,0x23CE,0x2423,0x2423, +0x2460,0x2473,0x24D0,0x24E9,0x24EB,0x24F4,0x24F5,0x24FE, +0x2500,0x2500,0x2501,0x2501,0x2502,0x2502,0x2503,0x2503, +0x250C,0x250C,0x250F,0x250F,0x2510,0x2510,0x2513,0x2513, +0x2514,0x2514,0x2517,0x2517,0x2518,0x2518,0x251B,0x251B, +0x251C,0x251C,0x251D,0x251D,0x2520,0x2520,0x2523,0x2523, +0x2524,0x2524,0x2525,0x2525,0x2528,0x2528,0x252B,0x252B, +0x252C,0x252C,0x252F,0x252F,0x2530,0x2530,0x2533,0x2533, +0x2534,0x2534,0x2537,0x2537,0x2538,0x2538,0x253B,0x253B, +0x253C,0x253C,0x253F,0x253F,0x2542,0x2542,0x254B,0x254B, +0x25A0,0x25A0,0x25A1,0x25A1,0x25B1,0x25B1,0x25B2,0x25B2, +0x25B3,0x25B3,0x25B6,0x25B6,0x25B7,0x25B7,0x25BC,0x25BC, +0x25BD,0x25BD,0x25C0,0x25C0,0x25C1,0x25C1,0x25C6,0x25C6, +0x25C7,0x25C7,0x25C9,0x25C9,0x25CB,0x25CB,0x25CE,0x25CE, +0x25CF,0x25CF,0x25D0,0x25D3,0x25E6,0x25E6,0x25EF,0x25EF, +0x2600,0x2603,0x2605,0x2605,0x2606,0x2606,0x260E,0x260E, +0x2616,0x2617,0x261E,0x261E,0x2640,0x2640,0x2642,0x2642, +0x2660,0x2660,0x2661,0x2661,0x2662,0x2662,0x2663,0x2663, +0x2664,0x2664,0x2665,0x2665,0x2666,0x2666,0x2667,0x2667, +0x2668,0x2668,0x2669,0x2669,0x266A,0x266A,0x266B,0x266C, +0x266D,0x266D,0x266E,0x266E,0x266F,0x266F,0x2713,0x2713, +0x2756,0x2756,0x2776,0x277F,0x2934,0x2935,0x29BF,0x29BF, +0x29FA,0x29FB,0x3000,0x3002,0x3003,0x3003,0x3005,0x3007, +0x3008,0x3011,0x3012,0x3012,0x3013,0x3013,0x3014,0x3015, +0x3016,0x3017,0x3018,0x3019,0x301C,0x301C,0x301D,0x301D, +0x301F,0x301F,0x3020,0x3020,0x3033,0x3035,0x303B,0x303C, +0x303D,0x303D,0x3041,0x3096,0x309B,0x309C,0x309D,0x309E, +0x309F,0x309F,0x30A0,0x30A0,0x30A1,0x30F6,0x30F7,0x30FA, +0x30FB,0x30FB,0x30FC,0x30FC,0x30FD,0x30FE,0x30FF,0x30FF, +0x31F0,0x31F9,0x31FA,0x31FF,0x3231,0x3232,0x3239,0x3239, +0x3251,0x325F,0x32A4,0x32A8,0x32B1,0x32BF,0x32D0,0x32E3, +0x32E5,0x32E5,0x32E9,0x32E9,0x32EC,0x32EC,0x32ED,0x32ED, +0x32FA,0x32FA,0x3303,0x3303,0x330D,0x330D,0x3314,0x3314, +0x3318,0x3318,0x3322,0x3322,0x3323,0x3323,0x3326,0x3326, +0x3327,0x3327,0x332B,0x332B,0x3336,0x3336,0x333B,0x333B, +0x3349,0x3349,0x334A,0x334A,0x334D,0x334D,0x3351,0x3351, +0x3357,0x3357,0x337B,0x337B,0x337C,0x337C,0x337D,0x337D, +0x337E,0x337E,0x338E,0x338F,0x339C,0x339E,0x33A1,0x33A1, +0x33C4,0x33C4,0x33CB,0x33CB,0x33CD,0x33CD,0x3402,0x3402, +0x3406,0x3406,0x342C,0x342C,0x342E,0x342E,0x3468,0x3468, +0x346A,0x346A,0x3492,0x3492,0x34B5,0x34B5,0x34BC,0x34BC, +0x34C1,0x34C1,0x34C7,0x34C7,0x34DB,0x34DB,0x351F,0x351F, +0x355D,0x355E,0x3563,0x3563,0x356E,0x356E,0x35A6,0x35A6, +0x35A8,0x35A8,0x35C5,0x35C5,0x35DA,0x35DA,0x35F4,0x35F4, +0x3605,0x3605,0x364A,0x364A,0x3691,0x3691,0x3696,0x3696, +0x3699,0x3699,0x36CF,0x36CF,0x3761,0x3761,0x3762,0x3762, +0x376B,0x376B,0x376C,0x376C,0x3775,0x3775,0x378D,0x378D, +0x37C1,0x37C1,0x37E2,0x37E2,0x37E8,0x37E8,0x37F4,0x37F4, +0x37FD,0x37FD,0x3800,0x3800,0x382F,0x382F,0x3836,0x3836, +0x3840,0x3840,0x385C,0x385C,0x3861,0x3861,0x38FA,0x38FA, +0x3917,0x3917,0x391A,0x391A,0x396F,0x396F,0x3A6E,0x3A6E, +0x3A73,0x3A73,0x3AD6,0x3AD6,0x3AD7,0x3AD7,0x3AEA,0x3AEA, +0x3B0E,0x3B0E,0x3B1A,0x3B1A,0x3B1C,0x3B1C,0x3B22,0x3B22, +0x3B6D,0x3B6D,0x3B77,0x3B77,0x3B87,0x3B88,0x3B8D,0x3B8D, +0x3BA4,0x3BA4,0x3BB6,0x3BB6,0x3BC3,0x3BC3,0x3BCD,0x3BCD, +0x3BF0,0x3BF0,0x3C0F,0x3C0F,0x3C26,0x3C26,0x3CC3,0x3CC3, +0x3CD2,0x3CD2,0x3D11,0x3D11,0x3D1E,0x3D1E,0x3D64,0x3D64, +0x3D9A,0x3D9A,0x3DC0,0x3DC0,0x3DD4,0x3DD4,0x3E05,0x3E05, +0x3E3F,0x3E3F,0x3E60,0x3E60,0x3E66,0x3E66,0x3E68,0x3E68, +0x3E83,0x3E83,0x3E94,0x3E94,0x3F57,0x3F57,0x3F72,0x3F72, +0x3F75,0x3F75,0x3F77,0x3F77,0x3FAE,0x3FAE,0x3FC9,0x3FC9, +0x3FD7,0x3FD7,0x4039,0x4039,0x4058,0x4058,0x4093,0x4093, +0x4105,0x4105,0x4148,0x4148,0x414F,0x414F,0x4163,0x4163, +0x41B4,0x41B4,0x41BF,0x41BF,0x41E6,0x41E6,0x41EE,0x41EE, +0x41F3,0x41F3,0x4207,0x4207,0x420E,0x420E,0x4264,0x4264, +0x42C6,0x42C6,0x42D6,0x42D6,0x42DD,0x42DD,0x4302,0x4302, +0x432B,0x432B,0x4343,0x4343,0x43EE,0x43EE,0x43F0,0x43F0, +0x4408,0x4408,0x4417,0x4417,0x441C,0x441C,0x4422,0x4422, +0x4453,0x4453,0x445B,0x445B,0x4476,0x4476,0x447A,0x447A, +0x4491,0x4491,0x44B3,0x44B3,0x44BE,0x44BE,0x44D4,0x44D4, +0x4508,0x4508,0x450D,0x450D,0x4525,0x4525,0x4543,0x4543, +0x459D,0x459D,0x45B8,0x45B8,0x45E5,0x45E5,0x45EA,0x45EA, +0x460F,0x460F,0x4641,0x4641,0x4665,0x4665,0x46A1,0x46A1, +0x46AF,0x46AF,0x470C,0x470C,0x4764,0x4764,0x47FD,0x47FD, +0x4816,0x4816,0x4844,0x4844,0x484E,0x484E,0x48B5,0x48B5, +0x49B0,0x49B0,0x49E7,0x49E7,0x49FA,0x49FA,0x4A04,0x4A04, +0x4A29,0x4A29,0x4ABC,0x4ABC,0x4B3B,0x4B3B,0x4BC2,0x4BC2, +0x4BCA,0x4BCA,0x4BD2,0x4BD2,0x4BE8,0x4BE8,0x4C17,0x4C17, +0x4C20,0x4C20,0x4CC4,0x4CC4,0x4CD1,0x4CD1,0x4D07,0x4D07, +0x4D77,0x4D77,}; + +static const unsigned short ucs_c1_jisx0213_ofst[] = { +0x2872,0x2B46,0x2B50,0x213E,0x237C,0x213D,0x2142,0x2146, +0x2148,0x2277,0x2340,0x2145,0x2144,0x2273,0x216C,0x2228, +0x286B,0x007E,0x2B58,0x2C7E,0x286C,0x2C7D,0x2921,0x216E, +0x235D,0x235F,0x2D62,0x2D64,0x2360,0x2272,0x235C,0x2778, +0x2D35,0x2D57,0x2C35,0x222B,0x222A,0x222D,0x2271,0x2327, +0x2325,0x2328,0x2329,0x224D,0x224E,0x232B,0x232A,0x232D, +0x224F,0x225F,0x2250,0x2247,0x2260,0x223A,0x2246,0x223B, +0x215D,0x235B,0x2265,0x2267,0x2167,0x2D78,0x225C,0x2254, +0x224A,0x2241,0x2240,0x2269,0x2D73,0x2168,0x2268,0x2266, +0x226C,0x226D,0x226E,0x2262,0x2162,0x2261,0x226B,0x2165, +0x2263,0x226F,0x223E,0x2242,0x223C,0x2244,0x2251,0x225D, +0x2D79,0x2776,0x2248,0x225E,0x277C,0x2742,0x277E,0x277D, +0x2D21,0x2C41,0x2C2B,0x265A,0x2821,0x282C,0x2822,0x282D, +0x2823,0x282E,0x2824,0x282F,0x2826,0x2831,0x2825,0x2830, +0x2827,0x283C,0x2837,0x2832,0x2829,0x283E,0x2839,0x2834, +0x2828,0x2838,0x283D,0x2833,0x282A,0x283A,0x283F,0x2835, +0x282B,0x283B,0x2840,0x2836,0x2223,0x2222,0x266D,0x2225, +0x2224,0x2322,0x2321,0x2227,0x2226,0x2324,0x2323,0x2221, +0x217E,0x233B,0x217B,0x217D,0x217C,0x2867,0x233F,0x227E, +0x2668,0x217A,0x2179,0x2667,0x2664,0x2D7E,0x216A,0x2169, +0x263A,0x263D,0x263B,0x2640,0x2639,0x263E,0x263C,0x263F, +0x266C,0x227D,0x2276,0x227B,0x2275,0x227A,0x2274,0x277B, +0x2D7D,0x2C21,0x232E,0x233A,0x237D,0x2121,0x2137,0x2139, +0x2152,0x2229,0x222E,0x214C,0x225A,0x2258,0x2141,0x2D60, +0x2D61,0x2666,0x2233,0x2236,0x233C,0x2421,0x212B,0x2135, +0x2239,0x237B,0x2521,0x2772,0x2126,0x213C,0x2133,0x2238, +0x266E,0x2679,0x2D6A,0x2D6C,0x2841,0x2D65,0x2850,0x2C5B, +0x2C71,0x2C70,0x2C73,0x2C72,0x2C6F,0x2D46,0x2D4A,0x2D41, +0x2D44,0x2D42,0x2D4C,0x2D4B,0x2D45,0x2D4D,0x2D47,0x2D4F, +0x2D40,0x2D4E,0x2D43,0x2D48,0x2D49,0x2D5F,0x2D6F,0x2D6E, +0x2D6D,0x2D53,0x2D50,0x2D56,0x2D55,0x235E,0x2D63,0x2E23, +0x7F2D,0x7F32,0x7F33,0x7F5E,0x7F56,0x7F7E,0x2E53,0x812B, +0x8E68,0x812F,0x2E5B,0x8148,0x815D,0x8161,0x8167,0x8223, +0x8226,0x822F,0x8238,0x8242,0x824A,0x8279,0x833F,0x8343, +0x8341,0x8357,0x8023,0x8025,0x8029,0x8028,0x802C,0x4F5F, +0x803E,0x4F6F,0x8056,0x8059,0x805C,0x805E,0x806F,0x8071, +0x8074,0x8079,0x807B,0x843B,0x8446,0x844A,0x8460,0x855B, +0x855F,0x8571,0x8636,0x857C,0x862E,0x8632,0x8634,0x7549, +0x866D,0x8665,0x8728,0x872C,0x8734,0x757E,0x7621,0x8748, +0x875D,0x763A,0x8777,0x883B,0x8842,0x8871,0x887E,0x8940, +0x8954,0x8970,0x8977,0x8A28,0x7766,0x8A3F,0x8A41,0x8A42, +0x8A49,0x8A50,0x8B34,0x784D,0x8B46,0x8B48,0x8B5C,0x8B67, +0x8B6C,0x8C22,0x8C2D,0x8C39,0x8C64,0x8C74,0x8C77,0x8C7D, +0x8D33,0x8D37,0x8D47,0x8D4B,0x8D48,0x8D53,0x8D57,0x796D, +0x8E2B,0x8E36,0x8E3B,0x8E4E,0x8E5D,0x8E61,0x8F3E,0x8F42, +0x8F48,0x8F4A,0x8F4C,0x8F4F,0x7A59,0x7A5A,0x8F6C,0x8F6E, +0x8F77,0x9035,0x9032,0x9034,0x9059,0x9054,0x906D,0x906E, +0x7B51,0x914F,0x916C,0x7B60,0x9224,0x923A,0x9243,0x924E, +0x9253,0x926B,0x9329,0x933F,0x9349,0x7C4B,0x935C,0x9427, +0x7D58,0x956A,0x9570,0x9575,0x9578,0x9637,0x9655,0x9726, +0x9728,0x972A,0x9731,0x7E3E,0x973F,0x982A,0x982D,0x984B, +0x9860,}; + +static const int ucs_c1_jisx0213_tbl_len = sizeof(ucs_c1_jisx0213_ofst)/sizeof(unsigned short); + +static const int ucs_c1_jisx0213_min = 0x1E00; +static const int ucs_c1_jisx0213_max = 0x4DFF; + +/* CJK Unified ideographs Extension B: U+2XXXX */ +static const unsigned short jisx0213_jis_u5_tbl[] = { +0x000B,0x123D,0x131B,0x146E,0x18BD,0x0B9F,0x16B4,0x1E34, +0x31C4,0x35C4,0x373F,0x3763,0x3CFE,0x47F1,0x548E,0x550E, +0x5771,0x59C4,0x5DA1,0x6AFF,0x6E40,0x70F4,0x7684,0x8277, +0x83CD,0xA190,0x0089,0x00A2,0x00A4,0x01A2,0x0213,0x032B, +0x0381,0x0371,0x1C56,0x1D2D,0x1D45,0x1D78,0x1D62,0x1DA1, +0x1D9C,0x1D92,0x1DB7,0x1DE0,0x1E33,0x1F1E,0x1F76,0x1FFA, +0x03F9,0x044A,0x0509,0x05D6,0x0628,0x074F,0x0807,0x083A, +0x08B9,0x097C,0x099D,0x0AD3,0x0B1D,0x0D45,0x0DE1,0x0E95, +0x0E6D,0x0E64,0x0F5F,0x1201,0x1255,0x127B,0x1274,0x12E4, +0x12D7,0x12FD,0x1336,0x1344,0x13C4,0x146D,0x15D7,0x6C29, +0x1647,0x1706,0x1742,0x19C3,0x217B,0x231E,0x23AD,0x26F3, +0x285B,0x28AB,0x298F,0x2AB8,0x2B4F,0x2B50,0x2B46,0x2C1D, +0x2BA6,0x2C24,0x2DE1,0x31C3,0x31F5,0x31B6,0x3372,0x33D3, +0x33D2,0x33D0,0x33E4,0x33D5,0x33DA,0x33DF,0x344A,0x3451, +0x344B,0x3465,0x34E4,0x355A,0x3594,0x3639,0x3647,0x3638, +0x363A,0x371C,0x370C,0x3764,0x37FF,0x37E7,0x3824,0x383D, +0x3A98,0x3C7F,0x3D00,0x3D40,0x3DFA,0x3DF9,0x3DD3,0x3F7E, +0x4096,0x4103,0x41C6,0x41FE,0x43BC,0x4629,0x46A5,0x4896, +0x4A4D,0x4B56,0x4B6F,0x4C16,0x4D14,0x4E0E,0x4E37,0x4E6A, +0x4E8B,0x504A,0x5055,0x5122,0x51A9,0x51E5,0x51CD,0x521E, +0x524C,0x542E,0x54D9,0x55A7,0x57A9,0x57B4,0x59D4,0x5AE4, +0x5AE3,0x5AF1,0x5BB2,0x5C4B,0x5C64,0x5E2E,0x5E56,0x5E65, +0x5E62,0x5ED8,0x5EC2,0x5EE8,0x5F23,0x5F5C,0x5FE0,0x5FD4, +0x600C,0x5FFB,0x6017,0x6060,0x60ED,0x6270,0x6286,0x634C, +0x3D0E,0x6402,0x667E,0x66B0,0x671D,0x68DD,0x68EA,0x6951, +0x696F,0x69DD,0x6A1E,0x6A58,0x6A8C,0x6AB7,0x6C73,0x6CDD, +0x6E65,0x6F94,0x6FF8,0x6FF6,0x6FF7,0x710D,0x7139,0x73DB, +0x73DA,0x73FE,0x7410,0x7449,0x7615,0x7614,0x7631,0x7693, +0x770E,0x7723,0x7752,0x7985,0x7A84,0x7BB3,0x7BBE,0x7BC7, +0x7CB8,0x7DA0,0x7E10,0x7FB7,0x808A,0x80BB,0x8282,0x82F3, +0x840C,0x8455,0x856B,0x85C8,0x85C9,0x86D7,0x86FA,0x8949, +0x8946,0x896B,0x8987,0x8988,0x89BA,0x89BB,0x8A1E,0x8A29, +0x8A71,0x8A43,0x8A99,0x8ACD,0x8AE4,0x8ADD,0x8BC1,0x8BEF, +0x8D10,0x8D71,0x8DFB,0x8E1F,0x8E36,0x8E89,0x8EEB,0x8F32, +0x8FF8,0x92A0,0x92B1,0x9490,0x95CF,0x967F,0x96F0,0x9719, +0x9750,0x98C6,0x9A72,0x9DDB,0x9E3D,0x9E15,0x9E8A,0x9E49, +0x9EC4,0x9EE9,0x9EDB,0x9FCE,0xA02F,0xA01A,0xA0F9,0xA082, +0x2218,0xA38C,0xA437,0xA5F1,0xA602,0xA61A,0xA6B2,}; + +static const unsigned short jisx0213_jis_u5_key[] = { +0x2E22,0x2F42,0x2F4C,0x2F60,0x2F7B,0x4F54,0x4F63,0x4F6E, +0x753A,0x7572,0x7629,0x7632,0x7660,0x776C,0x787E,0x7929, +0x7947,0x7954,0x796E,0x7A5D,0x7B33,0x7B49,0x7B6C,0x7C49, +0x7C51,0x7E66,0x7F21,0x7F2B,0x7F2E,0x7F36,0x7F46,0x7F70, +0x7F77,0x7F79,0x8030,0x8037,0x8038,0x803A,0x803B,0x803F, +0x8040,0x8045,0x8048,0x804A,0x804B,0x805B,0x8066,0x806C, +0x8122,0x8125,0x8127,0x8131,0x8132,0x8138,0x813F,0x8141, +0x814A,0x8152,0x8153,0x8159,0x815C,0x8177,0x822A,0x8231, +0x8232,0x823A,0x823D,0x8259,0x825C,0x825E,0x8263,0x826A, +0x826B,0x8272,0x8274,0x8275,0x8325,0x8332,0x833E,0x8344, +0x8347,0x8355,0x8356,0x837E,0x8422,0x842B,0x8430,0x8450, +0x8465,0x846D,0x8472,0x8524,0x8529,0x852A,0x8532,0x8534, +0x8535,0x8539,0x8556,0x857D,0x8623,0x8624,0x863A,0x863C, +0x863D,0x8642,0x8643,0x8644,0x8647,0x8649,0x8655,0x8656, +0x8657,0x865B,0x8677,0x8678,0x872A,0x873F,0x8740,0x8742, +0x8743,0x874E,0x8759,0x8761,0x8769,0x876A,0x8770,0x8775, +0x8823,0x8834,0x8849,0x885C,0x885E,0x885F,0x8860,0x8932, +0x8947,0x894D,0x8961,0x8964,0x8A22,0x8A33,0x8A39,0x8A53, +0x8A7B,0x8B2E,0x8B30,0x8B35,0x8B44,0x8B5D,0x8B61,0x8B66, +0x8B69,0x8B75,0x8B77,0x8B7A,0x8C21,0x8C23,0x8C24,0x8C28, +0x8C2C,0x8C3D,0x8C48,0x8C5B,0x8C75,0x8C76,0x8D32,0x8D3D, +0x8D3E,0x8D40,0x8D52,0x8D5D,0x8D5E,0x8D73,0x8D74,0x8D75, +0x8D77,0x8D7B,0x8D7D,0x8E22,0x8E24,0x8E27,0x8E2E,0x8E2F, +0x8E34,0x8E35,0x8E3D,0x8E42,0x8E4F,0x8E69,0x8E6B,0x8E72, +0x8E75,0x8E79,0x8F35,0x8F3A,0x8F46,0x8F56,0x8F58,0x8F5A, +0x8F5D,0x8F5F,0x8F63,0x8F6A,0x8F70,0x8F73,0x9044,0x904E, +0x905D,0x9075,0x907E,0x9121,0x9122,0x9133,0x9136,0x9164, +0x9165,0x916B,0x916E,0x9173,0x9229,0x922A,0x922C,0x9234, +0x923C,0x923E,0x9242,0x9256,0x9263,0x9277,0x9279,0x927A, +0x9325,0x932F,0x9332,0x9339,0x9342,0x9348,0x9359,0x935E, +0x9366,0x936B,0x937A,0x937E,0x9421,0x942C,0x942F,0x944F, +0x9450,0x9457,0x9465,0x9466,0x9471,0x9472,0x947E,0x9521, +0x952C,0x952D,0x9536,0x9537,0x953D,0x953E,0x954E,0x954F, +0x9557,0x955A,0x955C,0x955D,0x9561,0x9565,0x9567,0x9569, +0x9571,0x9622,0x9623,0x9638,0x9642,0x964C,0x9656,0x9659, +0x965D,0x9676,0x972C,0x974B,0x974C,0x9759,0x975B,0x975D, +0x9767,0x976D,0x9770,0x9825,0x9829,0x982B,0x9832,0x9835, +0x9853,0x9858,0x985A,0x986E,0x9870,0x9872,0x9876,}; + +static const unsigned short jisx0213_u5_jis_tbl[] = { +0x2E22,0x7F21,0x7F2B,0x7F2E,0x7F36,0x7F46,0x7F70,0x7F79, +0x7F77,0x8122,0x8125,0x8127,0x8131,0x8132,0x8138,0x813F, +0x8141,0x814A,0x8152,0x8153,0x8159,0x815C,0x4F54,0x8177, +0x822A,0x823A,0x8232,0x8231,0x823D,0x8259,0x2F42,0x825C, +0x8263,0x825E,0x826B,0x826A,0x8272,0x2F4C,0x8274,0x8275, +0x8325,0x8332,0x2F60,0x833E,0x8347,0x4F63,0x8355,0x8356, +0x2F7B,0x837E,0x8030,0x8037,0x8038,0x803B,0x803A,0x8045, +0x8040,0x803F,0x8048,0x804A,0x804B,0x4F6E,0x805B,0x8066, +0x806C,0x8422,0x9853,0x842B,0x8430,0x8450,0x8465,0x846D, +0x8472,0x8524,0x8532,0x8529,0x852A,0x8535,0x8534,0x8539, +0x8556,0x8624,0x857D,0x753A,0x8623,0x863A,0x8642,0x863D, +0x863C,0x8644,0x8647,0x8649,0x8643,0x8655,0x8657,0x8656, +0x865B,0x8677,0x8678,0x872A,0x7572,0x8742,0x873F,0x8743, +0x8740,0x8759,0x874E,0x7629,0x7632,0x8761,0x876A,0x8769, +0x8770,0x8775,0x8823,0x8834,0x7660,0x8849,0x8E75,0x885C, +0x8860,0x885F,0x885E,0x8932,0x8947,0x894D,0x8961,0x8964, +0x8A22,0x8A33,0x8A39,0x776C,0x8A53,0x8A7B,0x8B2E,0x8B30, +0x8B35,0x8B44,0x8B5D,0x8B61,0x8B66,0x8B69,0x8B75,0x8B77, +0x8B7A,0x8C21,0x8C24,0x8C23,0x8C28,0x8C2C,0x8C3D,0x787E, +0x8C48,0x7929,0x8C5B,0x7947,0x8C75,0x8C76,0x7954,0x8D32, +0x8D3E,0x8D3D,0x8D40,0x8D52,0x8D5D,0x8D5E,0x796E,0x8D73, +0x8D74,0x8D77,0x8D75,0x8D7D,0x8D7B,0x8E22,0x8E24,0x8E27, +0x8E2F,0x8E2E,0x8E35,0x8E34,0x8E3D,0x8E42,0x8E4F,0x8E69, +0x8E6B,0x8E72,0x8E79,0x8F35,0x8F3A,0x8F46,0x8F56,0x8F58, +0x8F5A,0x8F5D,0x8F5F,0x8F63,0x8F6A,0x8F70,0x8F73,0x7A5D, +0x8344,0x9044,0x904E,0x7B33,0x905D,0x9075,0x9121,0x9122, +0x907E,0x7B49,0x9133,0x9136,0x9165,0x9164,0x916B,0x916E, +0x9173,0x922A,0x9229,0x922C,0x7B6C,0x9234,0x923C,0x923E, +0x9242,0x9256,0x9263,0x9277,0x9279,0x927A,0x9325,0x932F, +0x9332,0x9339,0x9342,0x9348,0x7C49,0x9359,0x935E,0x7C51, +0x9366,0x936B,0x937A,0x937E,0x9421,0x942C,0x942F,0x9450, +0x944F,0x9457,0x9465,0x9466,0x9471,0x9472,0x947E,0x9521, +0x952D,0x952C,0x9536,0x9537,0x953E,0x953D,0x954E,0x954F, +0x9557,0x955A,0x955C,0x955D,0x9561,0x9565,0x9567,0x9569, +0x9571,0x9622,0x9623,0x9638,0x9642,0x964C,0x9656,0x9659, +0x965D,0x9676,0x972C,0x974B,0x9759,0x974C,0x975D,0x975B, +0x9767,0x9770,0x976D,0x9825,0x982B,0x9829,0x9835,0x9832, +0x7E66,0x9858,0x985A,0x986E,0x9870,0x9872,0x9876,}; + +static const unsigned short jisx0213_u5_jis_key[] = { +0x000B,0x0089,0x00A2,0x00A4,0x01A2,0x0213,0x032B,0x0371, +0x0381,0x03F9,0x044A,0x0509,0x05D6,0x0628,0x074F,0x0807, +0x083A,0x08B9,0x097C,0x099D,0x0AD3,0x0B1D,0x0B9F,0x0D45, +0x0DE1,0x0E64,0x0E6D,0x0E95,0x0F5F,0x1201,0x123D,0x1255, +0x1274,0x127B,0x12D7,0x12E4,0x12FD,0x131B,0x1336,0x1344, +0x13C4,0x146D,0x146E,0x15D7,0x1647,0x16B4,0x1706,0x1742, +0x18BD,0x19C3,0x1C56,0x1D2D,0x1D45,0x1D62,0x1D78,0x1D92, +0x1D9C,0x1DA1,0x1DB7,0x1DE0,0x1E33,0x1E34,0x1F1E,0x1F76, +0x1FFA,0x217B,0x2218,0x231E,0x23AD,0x26F3,0x285B,0x28AB, +0x298F,0x2AB8,0x2B46,0x2B4F,0x2B50,0x2BA6,0x2C1D,0x2C24, +0x2DE1,0x31B6,0x31C3,0x31C4,0x31F5,0x3372,0x33D0,0x33D2, +0x33D3,0x33D5,0x33DA,0x33DF,0x33E4,0x344A,0x344B,0x3451, +0x3465,0x34E4,0x355A,0x3594,0x35C4,0x3638,0x3639,0x363A, +0x3647,0x370C,0x371C,0x373F,0x3763,0x3764,0x37E7,0x37FF, +0x3824,0x383D,0x3A98,0x3C7F,0x3CFE,0x3D00,0x3D0E,0x3D40, +0x3DD3,0x3DF9,0x3DFA,0x3F7E,0x4096,0x4103,0x41C6,0x41FE, +0x43BC,0x4629,0x46A5,0x47F1,0x4896,0x4A4D,0x4B56,0x4B6F, +0x4C16,0x4D14,0x4E0E,0x4E37,0x4E6A,0x4E8B,0x504A,0x5055, +0x5122,0x51A9,0x51CD,0x51E5,0x521E,0x524C,0x542E,0x548E, +0x54D9,0x550E,0x55A7,0x5771,0x57A9,0x57B4,0x59C4,0x59D4, +0x5AE3,0x5AE4,0x5AF1,0x5BB2,0x5C4B,0x5C64,0x5DA1,0x5E2E, +0x5E56,0x5E62,0x5E65,0x5EC2,0x5ED8,0x5EE8,0x5F23,0x5F5C, +0x5FD4,0x5FE0,0x5FFB,0x600C,0x6017,0x6060,0x60ED,0x6270, +0x6286,0x634C,0x6402,0x667E,0x66B0,0x671D,0x68DD,0x68EA, +0x6951,0x696F,0x69DD,0x6A1E,0x6A58,0x6A8C,0x6AB7,0x6AFF, +0x6C29,0x6C73,0x6CDD,0x6E40,0x6E65,0x6F94,0x6FF6,0x6FF7, +0x6FF8,0x70F4,0x710D,0x7139,0x73DA,0x73DB,0x73FE,0x7410, +0x7449,0x7614,0x7615,0x7631,0x7684,0x7693,0x770E,0x7723, +0x7752,0x7985,0x7A84,0x7BB3,0x7BBE,0x7BC7,0x7CB8,0x7DA0, +0x7E10,0x7FB7,0x808A,0x80BB,0x8277,0x8282,0x82F3,0x83CD, +0x840C,0x8455,0x856B,0x85C8,0x85C9,0x86D7,0x86FA,0x8946, +0x8949,0x896B,0x8987,0x8988,0x89BA,0x89BB,0x8A1E,0x8A29, +0x8A43,0x8A71,0x8A99,0x8ACD,0x8ADD,0x8AE4,0x8BC1,0x8BEF, +0x8D10,0x8D71,0x8DFB,0x8E1F,0x8E36,0x8E89,0x8EEB,0x8F32, +0x8FF8,0x92A0,0x92B1,0x9490,0x95CF,0x967F,0x96F0,0x9719, +0x9750,0x98C6,0x9A72,0x9DDB,0x9E15,0x9E3D,0x9E49,0x9E8A, +0x9EC4,0x9EDB,0x9EE9,0x9FCE,0xA01A,0xA02F,0xA082,0xA0F9, +0xA190,0xA38C,0xA437,0xA5F1,0xA602,0xA61A,0xA6B2,}; + +static const int jisx0213_u5_tbl_min = 0x2000B; +static const int jisx0213_u5_tbl_max = 0x2A6B2; +static const int jisx0213_u5_tbl_len = sizeof(jisx0213_u5_jis_key)/sizeof(unsigned short); + +/* combined chars in JIS X 0213 */ +static const unsigned short jisx0213_u2_key[] = { + 0x2477,0x2478,0x2479,0x247A,0x247B,0x2577,0x2578,0x2579, + 0x257A,0x257B,0x257C,0x257D,0x257E,0x2678,0x2B44,0x2B48, + 0x2B49,0x2B4A,0x2B4B,0x2B4C,0x2B4D,0x2B4E,0x2B4F,0x2B65, + 0x2B66}; + +/* combined pairs in Unicode */ +static const unsigned short jisx0213_u2_tbl[] = { + 0x304B,0x309A,0x304D,0x309A,0x304F,0x309A,0x3051,0x309A, + 0x3053,0x309A,0x30AB,0x309A,0x30AD,0x309A,0x30AF,0x309A, + 0x30B1,0x309A,0x30B3,0x309A,0x30BB,0x309A,0x30C4,0x309A, + 0x30C8,0x309A,0x31F7,0x309A,0x00E6,0x0300,0x0254,0x0300, + 0x0254,0x0301,0x028C,0x0300,0x028C,0x0301,0x0259,0x0300, + 0x0259,0x0301,0x025A,0x0300,0x025A,0x0301,0x02E9,0x02E5, + 0x02E5,0x02E9}; + +/* fallback chars for combined chars in Unicode */ +static const unsigned short jisx0213_u2_fb_tbl[] = { + 0x242B,0x242D,0x242F,0x2431,0x2433,0x252B,0x252D,0x252F, + 0x2531,0x2533,0x253B,0x2544,0x2548,0x2675,0x295C,0x2B38, + 0x2B38,0x2B37,0x2B37,0x2B30,0x2B30,0x2B43,0x2B43,0x2B64, + 0x2B60}; + +static const int jisx0213_u2_tbl_len = sizeof(jisx0213_u2_key)/sizeof(unsigned short); + + +static const unsigned short jisx0213_p2_ofst[] = { + 1, 8, 3, 4, 5, 12, 13, 14, 15, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94}; + +static const int jisx0213_p2_ofst_len = + sizeof(jisx0213_p2_ofst)/sizeof(unsigned short); + +static const int uni2jis_tbl_range[][2] = { + {0x0000, 0x045f}, + {0x3000, 0x30ff}, + {0x4e00, 0x9fff}, + {0xff00, 0xffe5}, + {0xfa0f, 0xfa6a}, +}; + +static const unsigned short *uni2jis_tbl[] = { + ucs_a1_jisx0213_table, + ucs_hk_jisx0213_table, + ucs_i_jisx0213_table, + ucs_r_jisx0213_table, + ucs_r2_jisx0213_table, +}; + +static const int uni2jis_tbl_len = sizeof(uni2jis_tbl_range)/(sizeof(int)*2); + +#endif /* UNICODE_TABLE_JIS2004_H */ + diff --git a/ext/mbstring/libmbfl/filters/unicode_table_uhc.h b/ext/mbstring/libmbfl/filters/unicode_table_uhc.h index 802e120e08..6b98c65b6f 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_uhc.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_uhc.h @@ -28,8 +28,9 @@ /* * Unicode table */ +#ifdef UNICODE_TABLE_UHC_DEF -static const unsigned short uhc1_ucs_table[] = { +const unsigned short uhc1_ucs_table[] = { 0xac02,0xac03,0xac05,0xac06,0xac0b,0xac0c,0xac0d,0xac0e, 0xac0f,0xac18,0xac1e,0xac1f,0xac21,0xac22,0xac23,0xac25, 0xac26,0xac27,0xac28,0xac29,0xac2a,0xac2b,0xac2e,0xac32, @@ -792,9 +793,9 @@ static const unsigned short uhc1_ucs_table[] = { 0xc89a,0xc89b,0xc89c,0xc89e,0xc8a0,0xc8a2,0xc8a3,0xc8a4 }; -static const int uhc1_ucs_table_size = (sizeof(uhc1_ucs_table)/sizeof(unsigned short)); +const int uhc1_ucs_table_size = (sizeof(uhc1_ucs_table)/sizeof(unsigned short)); -static const unsigned short uhc2_ucs_table[] = { +const unsigned short uhc2_ucs_table[] = { 0xc8a5,0xc8a6,0xc8a7,0xc8a9,0xc8aa,0xc8ab,0xc8ac,0xc8ad, 0xc8ae,0xc8af,0xc8b0,0xc8b1,0xc8b2,0xc8b3,0xc8b4,0xc8b5, 0xc8b6,0xc8b7,0xc8b8,0xc8b9,0xc8ba,0xc8bb,0xc8be,0xc8bf, @@ -1699,9 +1700,9 @@ static const unsigned short uhc2_ucs_table[] = { 0xd3d0,0xd3d8,0xd3e1,0xd3e3,0xd3ec,0xd3ed,0xd3f0,0xd3f4, 0xd3fc,0xd3fd,0xd3ff,0xd401}; -static const int uhc2_ucs_table_size = (sizeof(uhc2_ucs_table)/sizeof(unsigned short)); +const int uhc2_ucs_table_size = (sizeof(uhc2_ucs_table)/sizeof(unsigned short)); -static const unsigned short uhc3_ucs_table[] = { +const unsigned short uhc3_ucs_table[] = { 0xd408,0xd41d,0xd440,0xd444,0xd45c,0xd460,0xd464,0xd46d, 0xd46f,0xd478,0xd479,0xd47c,0xd47f,0xd480,0xd482,0xd488, 0xd489,0xd48b,0xd48d,0xd494,0xd4a9,0xd4cc,0xd4d0,0xd4d4, @@ -2350,10 +2351,10 @@ static const unsigned short uhc3_ucs_table[] = { 0x665e,0x66e6,0x7199,0x71b9,0x71ba,0x72a7,0x79a7,0x7a00, 0x7fb2,0x8a70}; -static const int uhc3_ucs_table_size = (sizeof(uhc3_ucs_table)/sizeof(unsigned short)); +const int uhc3_ucs_table_size = (sizeof(uhc3_ucs_table)/sizeof(unsigned short)); /* UCS -> UHC */ -static const unsigned short ucs_a1_uhc_table[] = { +const unsigned short ucs_a1_uhc_table[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2498,10 +2499,10 @@ static const unsigned short ucs_a1_uhc_table[] = { 0xacea,0xaceb,0xacec,0xaced,0xacee,0xacef,0xacf0,0xacf1, 0x0000,0xacd7}; -static const int ucs_a1_uhc_table_min = 0x0000; -static const int ucs_a1_uhc_table_max = 0x0000 + (sizeof(ucs_a1_uhc_table)/sizeof(unsigned short)); +const int ucs_a1_uhc_table_min = 0x0000; +const int ucs_a1_uhc_table_max = 0x0000 + (sizeof(ucs_a1_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_a2_uhc_table[] = { +const unsigned short ucs_a2_uhc_table[] = { /* 0x2000 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -2714,10 +2715,10 @@ static const unsigned short ucs_a2_uhc_table[] = { 0xa2bc,0xa2bd,0x0000,0xa2c0,0xa2bb,0xa2be,0x0000,0xa2bf, 0xa2cd,0xa2db,0xa2dc,0x0000,0xa2dd,0xa2da}; -static const int ucs_a2_uhc_table_min = 0x2000; -static const int ucs_a2_uhc_table_max = 0x2000 + (sizeof(ucs_a2_uhc_table)/sizeof(unsigned short)); +const int ucs_a2_uhc_table_min = 0x2000; +const int ucs_a2_uhc_table_max = 0x2000 + (sizeof(ucs_a2_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_a3_uhc_table[] = { +const unsigned short ucs_a3_uhc_table[] = { /* 0x2f00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -2878,10 +2879,10 @@ static const unsigned short ucs_a3_uhc_table[] = { 0xa7ea,0x0000,0x0000,0xa7eb,0x0000,0x0000,0xa7df,0x0000, 0xa2e4,0x0000,0x0000,0xa7e4,0xa7ee,0xa7e9}; -static const int ucs_a3_uhc_table_min = 0x2f00; -static const int ucs_a3_uhc_table_max = 0x2f00 + (sizeof(ucs_a3_uhc_table)/sizeof(unsigned short)); +const int ucs_a3_uhc_table_min = 0x2f00; +const int ucs_a3_uhc_table_max = 0x2f00 + (sizeof(ucs_a3_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_i_uhc_table[] = { +const unsigned short ucs_i_uhc_table[] = { /* 0x4d00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -5591,10 +5592,10 @@ static const unsigned short ucs_i_uhc_table[] = { 0xdbc2,0x0000,0x0000,0x0000,0x0000,0xcafe,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0xcfcf}; -static const int ucs_i_uhc_table_min = 0x4d00; -static const int ucs_i_uhc_table_max = 0x4d00 + (sizeof(ucs_i_uhc_table)/sizeof(unsigned short)); +const int ucs_i_uhc_table_min = 0x4d00; +const int ucs_i_uhc_table_max = 0x4d00 + (sizeof(ucs_i_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_s_uhc_table[] = { +const unsigned short ucs_s_uhc_table[] = { /* 0xab00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -7070,10 +7071,10 @@ static const unsigned short ucs_s_uhc_table[] = { 0xc64f,0xc650,0xc651,0xc652}; -static const int ucs_s_uhc_table_min = 0xab00; -static const int ucs_s_uhc_table_max = 0xab00 + (sizeof(ucs_s_uhc_table)/sizeof(unsigned short)); +const int ucs_s_uhc_table_min = 0xab00; +const int ucs_s_uhc_table_max = 0xab00 + (sizeof(ucs_s_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_r1_uhc_table[] = { +const unsigned short ucs_r1_uhc_table[] = { /* 0xf800 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -7142,10 +7143,10 @@ static const unsigned short ucs_r1_uhc_table[] = { 0xf4ee,0xf6f4,0xf6f6,0xf7b8,0xf7c8,0xf7d3,0xf8db,0xf8f0, 0xfaa1,0xfaa2,0xfae6,0xfca9}; -static const int ucs_r1_uhc_table_min = 0xf800; -static const int ucs_r1_uhc_table_max = 0xf800 + (sizeof(ucs_r1_uhc_table)/sizeof(unsigned short)); +const int ucs_r1_uhc_table_min = 0xf800; +const int ucs_r1_uhc_table_max = 0xf800 + (sizeof(ucs_r1_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_r2_uhc_table[] = { +const unsigned short ucs_r2_uhc_table[] = { /* 0xff00 */ 0x0000,0xa3a1,0xa3a2,0xa3a3,0xa3a4,0xa3a5,0xa3a6,0xa3a7, 0xa3a8,0xa3a9,0xa3aa,0xa3ab,0xa3ac,0xa3ad,0xa3ae,0xa3af, @@ -7177,9 +7178,44 @@ static const unsigned short ucs_r2_uhc_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0xa1cb,0xa1cc,0xa1fe,0xa3fe,0x0000,0xa1cd,0xa3dc}; -static const int ucs_r2_uhc_table_min = 0xff00; -static const int ucs_r2_uhc_table_max = 0xff00 + (sizeof (ucs_r2_uhc_table) / sizeof (unsigned short)); +const int ucs_r2_uhc_table_min = 0xff00; +const int ucs_r2_uhc_table_max = 0xff00 + (sizeof (ucs_r2_uhc_table) / sizeof (unsigned short)); +#else + +extern const unsigned short uhc1_ucs_table[]; +extern const unsigned short uhc2_ucs_table[]; +extern const unsigned short uhc3_ucs_table[]; +extern const unsigned short ucs_a1_uhc_table[]; +extern const unsigned short ucs_a2_uhc_table[]; +extern const unsigned short ucs_a3_uhc_table[]; +extern const unsigned short ucs_i_uhc_table[]; +extern const unsigned short ucs_s_uhc_table[]; +extern const unsigned short ucs_r1_uhc_table[]; +extern const unsigned short ucs_r2_uhc_table[]; + +extern const int uhc1_ucs_table_size; +extern const int uhc2_ucs_table_size; +extern const int uhc3_ucs_table_size; +extern const int ucs_a1_uhc_table_min; +extern const int ucs_a1_uhc_table_max; +extern const int ucs_a2_uhc_table_min; +extern const int ucs_a2_uhc_table_max; +extern const int ucs_a3_uhc_table_min; +extern const int ucs_a3_uhc_table_max; +extern const int ucs_i_uhc_table_min; +extern const int ucs_i_uhc_table_max; +extern const int ucs_s_uhc_table_min; +extern const int ucs_s_uhc_table_max; +extern const int ucs_r1_uhc_table_min; +extern const int ucs_r1_uhc_table_max; +extern const int ucs_r2_uhc_table_min; +extern const int ucs_r2_uhc_table_max; + + + + +#endif diff --git a/ext/mbstring/libmbfl/mbfl/eaw_table.h b/ext/mbstring/libmbfl/mbfl/eaw_table.h index a4f1e4fdf1..af310ea1d8 100644 --- a/ext/mbstring/libmbfl/mbfl/eaw_table.h +++ b/ext/mbstring/libmbfl/mbfl/eaw_table.h @@ -2,8 +2,9 @@ static const struct { int begin; int end; } mbfl_eaw_table[] = { - { 0x1100, 0x1159 }, - { 0x115f, 0x115f }, + { 0x1100, 0x115f }, + { 0x11a3, 0x11a7 }, + { 0x11fa, 0x11ff }, { 0x2329, 0x232a }, { 0x2e80, 0x2e99 }, { 0x2e9b, 0x2ef3 }, @@ -12,25 +13,32 @@ static const struct { { 0x3000, 0x303e }, { 0x3041, 0x3096 }, { 0x3099, 0x30ff }, - { 0x3105, 0x312c }, + { 0x3105, 0x312d }, { 0x3131, 0x318e }, - { 0x3190, 0x31b7 }, + { 0x3190, 0x31ba }, + { 0x31c0, 0x31e3 }, { 0x31f0, 0x321e }, - { 0x3220, 0x3243 }, - { 0x3250, 0x327d }, - { 0x327f, 0x32fe }, - { 0x3300, 0x4db5 }, - { 0x4e00, 0x9fa5 }, - { 0xa000, 0xa48c }, + { 0x3220, 0x3247 }, + { 0x3250, 0x32fe }, + { 0x3300, 0x4dbf }, + { 0x4e00, 0xa48c }, { 0xa490, 0xa4c6 }, + { 0xa960, 0xa97c }, { 0xac00, 0xd7a3 }, - { 0xf900, 0xfa2d }, - { 0xfa30, 0xfa6a }, + { 0xd7b0, 0xd7c6 }, + { 0xd7cb, 0xd7fb }, + { 0xf900, 0xfaff }, + { 0xfe10, 0xfe19 }, { 0xfe30, 0xfe52 }, { 0xfe54, 0xfe66 }, { 0xfe68, 0xfe6b }, { 0xff01, 0xff60 }, { 0xffe0, 0xffe6 }, + { 0x1b000, 0x1b001 }, + { 0x1f200, 0x1f202 }, + { 0x1f210, 0x1f23a }, + { 0x1f240, 0x1f248 }, + { 0x1f250, 0x1f251 }, { 0x20000, 0x2fffd }, { 0x30000, 0x3fffd } }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 8f2c8bb14e..b3759f940d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -128,6 +128,18 @@ mbfl_buffer_converter_new( enum mbfl_no_encoding to, int buf_initsz) { + const mbfl_encoding *_from = mbfl_no2encoding(from); + const mbfl_encoding *_to = mbfl_no2encoding(to); + + return mbfl_buffer_converter_new2(_from ? _from: &mbfl_encoding_pass, _to ? _to: &mbfl_encoding_pass, buf_initsz); +} + +mbfl_buffer_converter * +mbfl_buffer_converter_new2( + const mbfl_encoding *from, + const mbfl_encoding *to, + int buf_initsz) +{ mbfl_buffer_converter *convd; /* allocate */ @@ -137,14 +149,8 @@ mbfl_buffer_converter_new( } /* initialize */ - convd->from = mbfl_no2encoding(from); - convd->to = mbfl_no2encoding(to); - if (convd->from == NULL) { - convd->from = &mbfl_encoding_pass; - } - if (convd->to == NULL) { - convd->to = &mbfl_encoding_pass; - } + convd->from = from; + convd->to = to; /* create convert filter */ convd->filter1 = NULL; @@ -173,6 +179,7 @@ mbfl_buffer_converter_new( return convd; } + void mbfl_buffer_converter_delete(mbfl_buffer_converter *convd) { @@ -251,6 +258,12 @@ mbfl_buffer_converter_strncat(mbfl_buffer_converter *convd, const unsigned char int mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string) { + return mbfl_buffer_converter_feed2(convd, string, NULL); +} + +int +mbfl_buffer_converter_feed2(mbfl_buffer_converter *convd, mbfl_string *string, int *loc) +{ int n; unsigned char *p; mbfl_convert_filter *filter; @@ -263,20 +276,27 @@ mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string) /* feed data */ n = string->len; p = string->val; + filter = convd->filter1; if (filter != NULL) { filter_function = filter->filter_function; while (n > 0) { if ((*filter_function)(*p++, filter) < 0) { + if (loc) { + *loc = p - string->val; + } return -1; } n--; } } - + if (loc) { + *loc = p - string->val; + } return 0; } + int mbfl_buffer_converter_flush(mbfl_buffer_converter *convd) { @@ -400,6 +420,49 @@ mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz, int strict return identd; } +mbfl_encoding_detector * +mbfl_encoding_detector_new2(const mbfl_encoding **elist, int elistsz, int strict) +{ + mbfl_encoding_detector *identd; + + int i, num; + mbfl_identify_filter *filter; + + if (elist == NULL || elistsz <= 0) { + return NULL; + } + + /* allocate */ + identd = (mbfl_encoding_detector*)mbfl_malloc(sizeof(mbfl_encoding_detector)); + if (identd == NULL) { + return NULL; + } + identd->filter_list = (mbfl_identify_filter **)mbfl_calloc(elistsz, sizeof(mbfl_identify_filter *)); + if (identd->filter_list == NULL) { + mbfl_free(identd); + return NULL; + } + + /* create filters */ + i = 0; + num = 0; + while (i < elistsz) { + filter = mbfl_identify_filter_new2(elist[i]); + if (filter != NULL) { + identd->filter_list[num] = filter; + num++; + } + i++; + } + identd->filter_list_size = num; + + /* set strict flag */ + identd->strict = strict; + + return identd; +} + + void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd) { @@ -454,33 +517,32 @@ mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string) return res; } -enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd) +const mbfl_encoding *mbfl_encoding_detector_judge2(mbfl_encoding_detector *identd) { mbfl_identify_filter *filter; - enum mbfl_no_encoding encoding; + const mbfl_encoding *encoding = NULL; int n; /* judge */ - encoding = mbfl_no_encoding_invalid; if (identd != NULL) { n = identd->filter_list_size - 1; while (n >= 0) { filter = identd->filter_list[n]; if (!filter->flag) { if (!identd->strict || !filter->status) { - encoding = filter->encoding->no_encoding; + encoding = filter->encoding; } } n--; } /* fallback judge */ - if (encoding == mbfl_no_encoding_invalid) { + if (!encoding) { n = identd->filter_list_size - 1; while (n >= 0) { filter = identd->filter_list[n]; if (!filter->flag) { - encoding = filter->encoding->no_encoding; + encoding = filter->encoding; } n--; } @@ -490,6 +552,12 @@ enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *ident return encoding; } +enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd) +{ + const mbfl_encoding *encoding = mbfl_encoding_detector_judge2(identd); + return !encoding ? mbfl_no_encoding_invalid: encoding->no_encoding; +} + /* * encoding converter @@ -646,36 +714,88 @@ mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int el return encoding; } -const char* -mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict) +const mbfl_encoding * +mbfl_identify_encoding2(mbfl_string *string, const mbfl_encoding **elist, int elistsz, int strict) { + int i, n, num, bad; + unsigned char *p; + mbfl_identify_filter *flist, *filter; const mbfl_encoding *encoding; - encoding = mbfl_identify_encoding(string, elist, elistsz, strict); - if (encoding != NULL && - encoding->no_encoding > mbfl_no_encoding_charset_min && - encoding->no_encoding < mbfl_no_encoding_charset_max) { - return encoding->name; - } else { + /* flist is an array of mbfl_identify_filter instances */ + flist = (mbfl_identify_filter *)mbfl_calloc(elistsz, sizeof(mbfl_identify_filter)); + if (flist == NULL) { return NULL; } -} -enum mbfl_no_encoding -mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict) -{ - const mbfl_encoding *encoding; + num = 0; + if (elist != NULL) { + for (i = 0; i < elistsz; i++) { + if (!mbfl_identify_filter_init2(&flist[num], elist[i])) { + num++; + } + } + } - encoding = mbfl_identify_encoding(string, elist, elistsz, strict); - if (encoding != NULL && - encoding->no_encoding > mbfl_no_encoding_charset_min && - encoding->no_encoding < mbfl_no_encoding_charset_max) { - return encoding->no_encoding; - } else { - return mbfl_no_encoding_invalid; + /* feed data */ + n = string->len; + p = string->val; + + if (p != NULL) { + bad = 0; + while (n > 0) { + for (i = 0; i < num; i++) { + filter = &flist[i]; + if (!filter->flag) { + (*filter->filter_function)(*p, filter); + if (filter->flag) { + bad++; + } + } + } + if ((num - 1) <= bad && !strict) { + break; + } + p++; + n--; + } + } + + /* judge */ + encoding = NULL; + + for (i = 0; i < num; i++) { + filter = &flist[i]; + if (!filter->flag) { + if (strict && filter->status) { + continue; + } + encoding = filter->encoding; + break; + } + } + + /* fall-back judge */ + if (!encoding) { + for (i = 0; i < num; i++) { + filter = &flist[i]; + if (!filter->flag && (!strict || !filter->status)) { + encoding = filter->encoding; + break; + } + } + } + + /* cleanup */ + /* dtors should be called in reverse order */ + i = num; while (--i >= 0) { + mbfl_identify_filter_cleanup(&flist[i]); } -} + mbfl_free((void *)flist); + + return encoding; +} /* * strlen @@ -2626,7 +2746,9 @@ collector_decode_htmlnumericentity(int c, void *data) } break; case 2: - if (c >= 0x30 && c <= 0x39) { /* '0' - '9' */ + if (c == 0x78) { /* 'x' */ + pc->status = 4; + } else if (c >= 0x30 && c <= 0x39) { /* '0' - '9' */ pc->cache = c - 0x30; pc->status = 3; pc->digit = 1; @@ -2690,6 +2812,89 @@ collector_decode_htmlnumericentity(int c, void *data) (*pc->decoder->filter_function)(c, pc->decoder); } break; + case 4: + if (c >= 0x30 && c <= 0x39) { /* '0' - '9' */ + pc->cache = c - 0x30; + pc->status = 5; + pc->digit = 1; + } else if (c >= 0x41 && c <= 0x46) { /* 'A' - 'F' */ + pc->cache = c - 0x41 + 10; + pc->status = 5; + pc->digit = 1; + } else if (c >= 0x61 && c <= 0x66) { /* 'a' - 'f' */ + pc->cache = c - 0x61 + 10; + pc->status = 5; + pc->digit = 1; + } else { + pc->status = 0; + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + (*pc->decoder->filter_function)(0x78, pc->decoder); /* 'x' */ + (*pc->decoder->filter_function)(c, pc->decoder); + } + break; + case 5: + s = 0; + f = 0; + if ((c >= 0x30 && c <= 0x39) || + (c >= 0x41 && c <= 0x46) || + (c >= 0x61 && c <= 0x66)) { /* '0' - '9' or 'a' - 'f' */ + if (pc->digit > 9) { + pc->status = 0; + s = pc->cache; + f = 1; + } else { + if (c >= 0x30 && c <= 0x39) { + s = pc->cache*16 + (c - 0x30); + } else if (c >= 0x41 && c <= 0x46) { + s = pc->cache*16 + (c - 0x41 + 10); + } else { + s = pc->cache*16 + (c - 0x61 + 10); + } + pc->cache = s; + pc->digit++; + } + } else { + pc->status = 0; + s = pc->cache; + f = 1; + n = 0; + size = pc->mapsize; + while (n < size) { + mapelm = &(pc->convmap[n*4]); + d = s - mapelm[2]; + if (d >= mapelm[0] && d <= mapelm[1]) { + f = 0; + (*pc->decoder->filter_function)(d, pc->decoder); + if (c != 0x3b) { /* ';' */ + (*pc->decoder->filter_function)(c, pc->decoder); + } + break; + } + n++; + } + } + if (f) { + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + (*pc->decoder->filter_function)(0x78, pc->decoder); /* 'x' */ + r = 1; + n = pc->digit; + while (n > 0) { + r *= 16; + n--; + } + s %= r; + r /= 16; + while (r > 0) { + d = s/r; + s %= r; + r /= 16; + (*pc->decoder->filter_function)(mbfl_hexchar_table[d], pc->decoder); + } + (*pc->decoder->filter_function)(c, pc->decoder); + } + break; default: if (c == 0x26) { /* '&' */ pc->status = 1; @@ -2702,6 +2907,53 @@ collector_decode_htmlnumericentity(int c, void *data) return c; } +static int +collector_encode_hex_htmlnumericentity(int c, void *data) +{ + struct collector_htmlnumericentity_data *pc = (struct collector_htmlnumericentity_data *)data; + int f, n, s, r, d, size, *mapelm; + + size = pc->mapsize; + f = 0; + n = 0; + while (n < size) { + mapelm = &(pc->convmap[n*4]); + if (c >= mapelm[0] && c <= mapelm[1]) { + s = (c + mapelm[2]) & mapelm[3]; + if (s >= 0) { + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + (*pc->decoder->filter_function)(0x78, pc->decoder); /* 'x' */ + r = 0x1000000; + s %= r; + while (r > 0) { + d = s/r; + if (d || f) { + f = 1; + s %= r; + (*pc->decoder->filter_function)(mbfl_hexchar_table[d], pc->decoder); + } + r /= 16; + } + if (!f) { + f = 1; + (*pc->decoder->filter_function)(mbfl_hexchar_table[0], pc->decoder); + } + (*pc->decoder->filter_function)(0x3b, pc->decoder); /* ';' */ + } + } + if (f) { + break; + } + n++; + } + if (!f) { + (*pc->decoder->filter_function)(c, pc->decoder); + } + + return c; +} + int mbfl_filt_decode_htmlnumericentity_flush(mbfl_convert_filter *filter) { struct collector_htmlnumericentity_data *pc = (struct collector_htmlnumericentity_data *)filter; @@ -2737,6 +2989,32 @@ int mbfl_filt_decode_htmlnumericentity_flush(mbfl_convert_filter *filter) } break; + case 4: /* 'x' */ + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + (*pc->decoder->filter_function)(0x78, pc->decoder); /* 'x' */ + break; + case 5: /* '0'-'9','a'-'f' */ + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + (*pc->decoder->filter_function)(0x78, pc->decoder); /* 'x' */ + + s = pc->cache; + r = 1; + n = pc->digit; + while (n > 0) { + r *= 16; + n--; + } + s %= r; + r /= 16; + while (r > 0) { + d = s/r; + s %= r; + r /= 16; + (*pc->decoder->filter_function)(mbfl_hexchar_table[d], pc->decoder); + } + break; default: break; } @@ -2749,6 +3027,7 @@ int mbfl_filt_decode_htmlnumericentity_flush(mbfl_convert_filter *filter) return 0; } + mbfl_string * mbfl_html_numeric_entity( mbfl_string *string, @@ -2777,16 +3056,21 @@ mbfl_html_numeric_entity( string->no_encoding, mbfl_memory_device_output, 0, &device); /* wchar filter */ - if (type == 0) { + if (type == 0) { /* decimal output */ encoder = mbfl_convert_filter_new( string->no_encoding, mbfl_no_encoding_wchar, collector_encode_htmlnumericentity, 0, &pc); - } else { + } else if (type == 2) { /* hex output */ + encoder = mbfl_convert_filter_new( + string->no_encoding, + mbfl_no_encoding_wchar, + collector_encode_hex_htmlnumericentity, 0, &pc); + } else { /* type == 1: decimal/hex input */ encoder = mbfl_convert_filter_new( string->no_encoding, mbfl_no_encoding_wchar, - collector_decode_htmlnumericentity, + collector_decode_htmlnumericentity, (int (*)(void*))mbfl_filt_decode_htmlnumericentity_flush, &pc); } if (pc.decoder == NULL || encoder == NULL) { diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index 4565fc6985..6108f93195 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -102,8 +102,8 @@ * version information */ #define MBFL_VERSION_MAJOR 1 -#define MBFL_VERSION_MINOR 1 -#define MBFL_VERSION_TEENY 0 +#define MBFL_VERSION_MINOR 3 +#define MBFL_VERSION_TEENY 2 /* * convert filter @@ -127,12 +127,14 @@ struct _mbfl_buffer_converter { }; MBFLAPI extern mbfl_buffer_converter * mbfl_buffer_converter_new(enum mbfl_no_encoding from, enum mbfl_no_encoding to, int buf_initsz); +MBFLAPI extern mbfl_buffer_converter * mbfl_buffer_converter_new2(const mbfl_encoding *from, const mbfl_encoding *to, int buf_initsz); MBFLAPI extern void mbfl_buffer_converter_delete(mbfl_buffer_converter *convd); MBFLAPI extern void mbfl_buffer_converter_reset(mbfl_buffer_converter *convd); MBFLAPI extern int mbfl_buffer_converter_illegal_mode(mbfl_buffer_converter *convd, int mode); MBFLAPI extern int mbfl_buffer_converter_illegal_substchar(mbfl_buffer_converter *convd, int substchar); MBFLAPI extern int mbfl_buffer_converter_strncat(mbfl_buffer_converter *convd, const unsigned char *p, int n); MBFLAPI extern int mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string); +MBFLAPI extern int mbfl_buffer_converter_feed2(mbfl_buffer_converter *convd, mbfl_string *string, int *loc); MBFLAPI extern int mbfl_buffer_converter_flush(mbfl_buffer_converter *convd); MBFLAPI extern mbfl_string * mbfl_buffer_converter_getbuffer(mbfl_buffer_converter *convd, mbfl_string *result); MBFLAPI extern mbfl_string * mbfl_buffer_converter_result(mbfl_buffer_converter *convd, mbfl_string *result); @@ -151,9 +153,11 @@ struct _mbfl_encoding_detector { }; MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz, int strict); +MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new2(const mbfl_encoding **elist, int elistsz, int strict); MBFLAPI extern void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd); MBFLAPI extern int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); MBFLAPI extern enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); +MBFLAPI extern const mbfl_encoding *mbfl_encoding_detector_judge2(mbfl_encoding_detector *identd); /* @@ -169,12 +173,8 @@ mbfl_convert_encoding(mbfl_string *string, mbfl_string *result, enum mbfl_no_enc MBFLAPI extern const mbfl_encoding * mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); -MBFLAPI extern const char * -mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); - -MBFLAPI extern enum mbfl_no_encoding -mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); - +MBFLAPI extern const mbfl_encoding * +mbfl_identify_encoding2(mbfl_string *string, const mbfl_encoding **elist, int elistsz, int strict); /* * strlen */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h index b6c0bb2d87..6a630c8fcd 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h @@ -42,7 +42,8 @@ #define MBFL_ENCTYPE_MWC4BE 0x00000400 #define MBFL_ENCTYPE_MWC4LE 0x00000800 #define MBFL_ENCTYPE_SHFTCODE 0x00001000 -#define MBFL_ENCTYPE_HTML_ENT 0x00002000 +#define MBFL_ENCTYPE_ENC_STRM 0x00002000 +#define MBFL_ENCTYPE_GL_UNSAFE 0x00004000 /* wchar plane, special charactor */ #define MBFL_WCSPLANE_MASK 0xffff @@ -50,6 +51,7 @@ #define MBFL_WCSPLANE_UTF32MAX 0x00110000 #define MBFL_WCSPLANE_SUPMIN 0x00010000 #define MBFL_WCSPLANE_SUPMAX 0x00200000 +#define MBFL_WCSPLANE_JIS0213 0x70e00000 /* JIS HEX : 2121h - 7E7Eh */ #define MBFL_WCSPLANE_JIS0208 0x70e10000 /* JIS HEX : 2121h - 7E7Eh */ #define MBFL_WCSPLANE_JIS0212 0x70e20000 /* JIS HEX : 2121h - 7E7Eh */ #define MBFL_WCSPLANE_WINCP932 0x70e30000 /* JIS HEX : 2121h - 9898h */ @@ -80,6 +82,7 @@ #define MBFL_WCSPLANE_KOI8U 0x70fc0000 #define MBFL_WCSPLANE_CP1254 0x70fd0000 /* 00h - FFh */ #define MBFL_WCSPLANE_CP850 0x70fe0000 /* 00h - FFh */ +#define MBFL_WCSPLANE_GB18030 0x70ff0000 /* a1a1h-e3329a35h */ #define MBFL_WCSGROUP_MASK 0xffffff #define MBFL_WCSGROUP_UCS4MAX 0x70000000 #define MBFL_WCSGROUP_WCHARMAX 0x78000000 diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index d81b533dd1..ae8deb25fb 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -52,11 +52,18 @@ #include "filters/mbfilter_iso2022_kr.h" #include "filters/mbfilter_sjis.h" #include "filters/mbfilter_sjis_open.h" +#include "filters/mbfilter_sjis_2004.h" +#include "filters/mbfilter_sjis_mobile.h" +#include "filters/mbfilter_sjis_mac.h" #include "filters/mbfilter_cp51932.h" #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" +#include "filters/mbfilter_gb18030.h" #include "filters/mbfilter_ascii.h" #include "filters/mbfilter_koi8r.h" #include "filters/mbfilter_koi8u.h" @@ -87,6 +94,7 @@ #include "filters/mbfilter_utf7.h" #include "filters/mbfilter_utf7imap.h" #include "filters/mbfilter_utf8.h" +#include "filters/mbfilter_utf8_mobile.h" #include "filters/mbfilter_utf16.h" #include "filters/mbfilter_utf32.h" #include "filters/mbfilter_byte2.h" @@ -111,6 +119,8 @@ const struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = { &vtbl_wchar_sjis, &vtbl_sjis_open_wchar, &vtbl_wchar_sjis_open, + &vtbl_sjis2004_wchar, + &vtbl_wchar_sjis2004, &vtbl_cp51932_wchar, &vtbl_wchar_cp51932, &vtbl_jis_wchar, @@ -121,20 +131,46 @@ const struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = { &vtbl_wchar_2022jp, &vtbl_2022jpms_wchar, &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, + &vtbl_wchar_eucjp2004, &vtbl_cp932_wchar, &vtbl_wchar_cp932, + &vtbl_sjis_docomo_wchar, + &vtbl_wchar_sjis_docomo, + &vtbl_sjis_kddi_wchar, + &vtbl_wchar_sjis_kddi, + &vtbl_sjis_sb_wchar, + &vtbl_wchar_sjis_sb, + &vtbl_sjis_mac_wchar, + &vtbl_wchar_sjis_mac, + &vtbl_utf8_docomo_wchar, + &vtbl_wchar_utf8_docomo, + &vtbl_utf8_kddi_a_wchar, + &vtbl_wchar_utf8_kddi_a, + &vtbl_utf8_kddi_b_wchar, + &vtbl_wchar_utf8_kddi_b, + &vtbl_utf8_sb_wchar, + &vtbl_wchar_utf8_sb, &vtbl_euccn_wchar, &vtbl_wchar_euccn, &vtbl_cp936_wchar, &vtbl_wchar_cp936, + &vtbl_gb18030_wchar, + &vtbl_wchar_gb18030, &vtbl_hz_wchar, &vtbl_wchar_hz, &vtbl_euctw_wchar, &vtbl_wchar_euctw, &vtbl_big5_wchar, &vtbl_wchar_big5, + &vtbl_cp950_wchar, + &vtbl_wchar_cp950, &vtbl_euckr_wchar, &vtbl_wchar_euckr, &vtbl_uhc_wchar, @@ -454,9 +490,15 @@ mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter) case MBFL_WCSPLANE_JIS0212: ret = mbfl_convert_filter_strcat(filter, (const unsigned char *)"JIS2+"); break; + case MBFL_WCSPLANE_JIS0213: + ret = mbfl_convert_filter_strcat(filter, (const unsigned char *)"JIS3+"); + break; case MBFL_WCSPLANE_WINCP932: ret = mbfl_convert_filter_strcat(filter, (const unsigned char *)"W932+"); break; + case MBFL_WCSPLANE_GB18030: + ret = mbfl_convert_filter_strcat(filter, (const unsigned char *)"GB+"); + break; case MBFL_WCSPLANE_8859_1: ret = mbfl_convert_filter_strcat(filter, (const unsigned char *)"I8859_1+"); break; diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c index 17955b2c9a..adf0c3ae87 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c @@ -58,11 +58,18 @@ #include "filters/mbfilter_iso2022_kr.h" #include "filters/mbfilter_sjis.h" #include "filters/mbfilter_sjis_open.h" +#include "filters/mbfilter_sjis_mobile.h" +#include "filters/mbfilter_sjis_mac.h" +#include "filters/mbfilter_sjis_2004.h" #include "filters/mbfilter_cp51932.h" #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" +#include "filters/mbfilter_gb18030.h" #include "filters/mbfilter_ascii.h" #include "filters/mbfilter_koi8r.h" #include "filters/mbfilter_koi8u.h" @@ -94,6 +101,7 @@ #include "filters/mbfilter_utf7.h" #include "filters/mbfilter_utf7imap.h" #include "filters/mbfilter_utf8.h" +#include "filters/mbfilter_utf8_mobile.h" #include "filters/mbfilter_utf16.h" #include "filters/mbfilter_utf32.h" #include "filters/mbfilter_byte2.h" @@ -155,12 +163,23 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_euc_jp, &mbfl_encoding_sjis, &mbfl_encoding_eucjp_win, + &mbfl_encoding_eucjp2004, &mbfl_encoding_sjis_open, + &mbfl_encoding_sjis_docomo, + &mbfl_encoding_sjis_kddi, + &mbfl_encoding_sjis_sb, + &mbfl_encoding_sjis_mac, + &mbfl_encoding_sjis2004, + &mbfl_encoding_utf8_docomo, + &mbfl_encoding_utf8_kddi_a, + &mbfl_encoding_utf8_kddi_b, + &mbfl_encoding_utf8_sb, &mbfl_encoding_cp932, &mbfl_encoding_cp51932, &mbfl_encoding_jis, &mbfl_encoding_2022jp, &mbfl_encoding_2022jpms, + &mbfl_encoding_gb18030, &mbfl_encoding_cp1252, &mbfl_encoding_cp1254, &mbfl_encoding_8859_1, @@ -182,6 +201,7 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_hz, &mbfl_encoding_euc_tw, &mbfl_encoding_big5, + &mbfl_encoding_cp950, &mbfl_encoding_euc_kr, &mbfl_encoding_uhc, &mbfl_encoding_2022kr, @@ -192,6 +212,8 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_armscii8, &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 fd3a66df6e..ca7717cb7b 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -62,18 +62,31 @@ enum mbfl_no_encoding { mbfl_no_encoding_utf16be, mbfl_no_encoding_utf16le, mbfl_no_encoding_utf8, + mbfl_no_encoding_utf8_docomo, + mbfl_no_encoding_utf8_kddi_a, + mbfl_no_encoding_utf8_kddi_b, + mbfl_no_encoding_utf8_sb, mbfl_no_encoding_utf7, mbfl_no_encoding_utf7imap, mbfl_no_encoding_ascii, mbfl_no_encoding_euc_jp, + mbfl_no_encoding_eucjp2004, mbfl_no_encoding_sjis, mbfl_no_encoding_eucjp_win, mbfl_no_encoding_sjis_open, + mbfl_no_encoding_sjis_docomo, + mbfl_no_encoding_sjis_kddi, + mbfl_no_encoding_sjis_sb, + mbfl_no_encoding_sjis_mac, + mbfl_no_encoding_sjis2004, mbfl_no_encoding_cp932, mbfl_no_encoding_cp51932, 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, mbfl_no_encoding_cp1254, mbfl_no_encoding_8859_1, @@ -93,6 +106,7 @@ enum mbfl_no_encoding { mbfl_no_encoding_cp936, mbfl_no_encoding_euc_tw, mbfl_no_encoding_big5, + mbfl_no_encoding_cp950, mbfl_no_encoding_euc_kr, mbfl_no_encoding_2022kr, mbfl_no_encoding_uhc, diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c index 9a89807053..4d6283f4f2 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c @@ -51,10 +51,15 @@ #include "filters/mbfilter_iso2022_kr.h" #include "filters/mbfilter_sjis.h" #include "filters/mbfilter_sjis_open.h" +#include "filters/mbfilter_sjis_mobile.h" #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" +#include "filters/mbfilter_utf8_mobile.h" #include "filters/mbfilter_ascii.h" #include "filters/mbfilter_koi8r.h" #include "filters/mbfilter_koi8u.h" @@ -66,6 +71,7 @@ #include "filters/mbfilter_cp1254.h" #include "filters/mbfilter_cp51932.h" #include "filters/mbfilter_cp5022x.h" +#include "filters/mbfilter_gb18030.h" #include "filters/mbfilter_iso8859_1.h" #include "filters/mbfilter_iso8859_2.h" #include "filters/mbfilter_iso8859_3.h" @@ -111,16 +117,27 @@ static const struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = { &vtbl_identify_sjis, &vtbl_identify_sjis_open, &vtbl_identify_eucjpwin, + &vtbl_identify_eucjp2004, &vtbl_identify_cp932, &vtbl_identify_jis, &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, + &vtbl_identify_sjis_sb, + &vtbl_identify_utf8_docomo, + &vtbl_identify_utf8_kddi_a, + &vtbl_identify_utf8_kddi_b, + &vtbl_identify_utf8_sb, &vtbl_identify_euccn, &vtbl_identify_cp936, &vtbl_identify_hz, &vtbl_identify_euctw, &vtbl_identify_big5, + &vtbl_identify_cp950, &vtbl_identify_euckr, &vtbl_identify_uhc, &vtbl_identify_2022kr, @@ -149,6 +166,7 @@ static const struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = { &vtbl_identify_cp50220, &vtbl_identify_cp50221, &vtbl_identify_cp50222, + &vtbl_identify_gb18030, &vtbl_identify_false, NULL }; @@ -191,15 +209,37 @@ mbfl_identify_filter *mbfl_identify_filter_new(enum mbfl_no_encoding encoding) return filter; } +mbfl_identify_filter *mbfl_identify_filter_new2(const mbfl_encoding *encoding) +{ + mbfl_identify_filter *filter; + + /* allocate */ + filter = (mbfl_identify_filter *)mbfl_malloc(sizeof(mbfl_identify_filter)); + if (filter == NULL) { + return NULL; + } + + if (mbfl_identify_filter_init2(filter, encoding)) { + mbfl_free(filter); + return NULL; + } + + return filter; +} + + int mbfl_identify_filter_init(mbfl_identify_filter *filter, enum mbfl_no_encoding encoding) { + const mbfl_encoding *enc = mbfl_no2encoding(encoding); + return mbfl_identify_filter_init2(filter, enc ? enc: &mbfl_encoding_pass); +} + +int mbfl_identify_filter_init2(mbfl_identify_filter *filter, const mbfl_encoding *encoding) +{ const struct mbfl_identify_vtbl *vtbl; /* encoding structure */ - filter->encoding = mbfl_no2encoding(encoding); - if (filter->encoding == NULL) { - filter->encoding = &mbfl_encoding_pass; - } + filter->encoding = encoding; filter->status = 0; filter->flag = 0; diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.h b/ext/mbstring/libmbfl/mbfl/mbfl_ident.h index b0721fc413..12d81cde8c 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.h @@ -58,8 +58,10 @@ struct mbfl_identify_vtbl { MBFLAPI extern const struct mbfl_identify_vtbl * mbfl_identify_filter_get_vtbl(enum mbfl_no_encoding encoding); MBFLAPI extern mbfl_identify_filter * mbfl_identify_filter_new(enum mbfl_no_encoding encoding); +MBFLAPI extern mbfl_identify_filter * mbfl_identify_filter_new2(const mbfl_encoding *encoding); MBFLAPI extern void mbfl_identify_filter_delete(mbfl_identify_filter *filter); MBFLAPI extern int mbfl_identify_filter_init(mbfl_identify_filter *filter, enum mbfl_no_encoding encoding); +MBFLAPI extern int mbfl_identify_filter_init2(mbfl_identify_filter *filter, const mbfl_encoding *encoding); MBFLAPI void mbfl_identify_filter_cleanup(mbfl_identify_filter *filter); MBFLAPI extern void mbfl_filt_ident_common_ctor(mbfl_identify_filter *filter); diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c index 6d93fa3529..7509ef1a6a 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c @@ -218,7 +218,7 @@ mbfl_memory_device_strcat(mbfl_memory_device *device, const char *psrc) const unsigned char *p; len = 0; - p = psrc; + p = (const unsigned char*)psrc; while (*p) { p++; len++; @@ -235,7 +235,7 @@ mbfl_memory_device_strcat(mbfl_memory_device *device, const char *psrc) device->buffer = tmp; } - p = psrc; + p = (const unsigned char*)psrc; w = &device->buffer[device->pos]; device->pos += len; while (len > 0) { diff --git a/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk b/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk index c7deb4cdf5..02c73f2025 100644 --- a/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk +++ b/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk @@ -18,7 +18,8 @@ BEGIN { /^[0-9a-fA-F]+;/ { if ($2 == "W" || $2 == "F") { - v = ( "0x" $1 ) + 0 + + v = strtonum( "0x" $1 ) if (prev < 0) { first = v } else if (v - prev > 1) { @@ -44,8 +45,8 @@ BEGIN { /^[0-9a-fA-F]+\.\./ { if ($4 == "W" || $4 == "F") { - vs = ( "0x" $1 ) + 0 - ve = ( "0x" $3 ) + 0 + vs = strtonum( "0x" $1 ) + ve = strtonum( "0x" $3 ) if (prev < 0) { first = vs } else if (vs - prev > 1) { diff --git a/ext/mbstring/libmbfl/tests/emoji.c b/ext/mbstring/libmbfl/tests/emoji.c new file mode 100644 index 0000000000..4f6a346576 --- /dev/null +++ b/ext/mbstring/libmbfl/tests/emoji.c @@ -0,0 +1,119 @@ +/** + * this is a small sample script to use libmbfl. + * Rui Hirokawa <hirokawa@php.net> + * + * this file is encoded in EUC-JP. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "mbfl/mbfilter.h" + +static void hexdump(const mbfl_string *ptr) +{ + unsigned int i; + + for (i = 0; i < ptr->len; i++) { + printf("%%%02x", ptr->val[i]); + } + + printf(" (%u)\n", ptr->len); +} + +//#define TEST_DOCOMO +//#define TEST_KDDI +#define TEST_SOFTBANK + +int main(int argc, char **argv) +{ + enum mbfl_no_encoding from_encoding, to_encoding; + enum mbfl_no_language no_language; + mbfl_buffer_converter *convd = NULL, *convd2 = NULL; + mbfl_memory_device dev, dev2; + mbfl_string string, result, *ret; +#ifdef TEST_DOCOMO + //char str[] = {0xF9,0xD7,0x00}; // U+2122 + //char str[] = {0xF9,0x82,0x00}; // U+1F195 + char str[] = {0xF9,0xD6,0x00}; // U+00A9 +#endif +#ifdef TEST_KDDI + //char str[] = {0xF7,0x6A,0x00};// U+2122 + //char str[] = {0xF7,0xE5,0x00}; // U+1F195 + //char str[] = {0xF3,0xD2,0x00}; // U+1F1E8 U+1F1F3 + char str[] = {0xF7,0x74,0x00}; // U+00A9 +#endif +#ifdef TEST_SOFTBANK + //char str[] = {0xFB,0xD7,0x00};// U+2122 + //char str[] = {0xF7,0xB2,0x00}; // U+1F195 + //char str[] = {0xFB,0xB3,0x00}; // U+1F1E8 U+1F1F3 + char str[] = {0xF7,0xEE,0x00}; // U+00A9 +#endif + int final = 0; + int state = 0; + int i; + + no_language = mbfl_name2no_language("Japanese"); +#ifdef TEST_DOCOMO + from_encoding = mbfl_name2no_encoding("SJIS-win#DOCOMO"); +#endif +#ifdef TEST_KDDI + from_encoding = mbfl_name2no_encoding("SJIS-win#KDDI"); +#endif +#ifdef TEST_SOFTBANK + from_encoding = mbfl_name2no_encoding("SJIS-win#SOFTBANK"); +#endif + to_encoding = mbfl_name2no_encoding("UTF-8"); + + convd = mbfl_buffer_converter_new(from_encoding, to_encoding, 0); + + mbfl_memory_device_init(&dev, 0, 4096); + mbfl_string_init_set(&string, no_language, from_encoding); + mbfl_memory_device_realloc(&dev, dev.length + dev.allocsz, dev.allocsz); + + strcpy(dev.buffer, str); + dev.pos += strlen(str); + + mbfl_memory_device_result(&dev, &string); + mbfl_string_init_set(&result, no_language, to_encoding); + ret = mbfl_buffer_converter_feed_result(convd, &string, &result); + +#if 0 + for (i = 0; i < result.len; i+= 2) { + if (result.val[i] >= 0xD8 && result.val[i] < 0xE0) { // Surrogate pair + int h = (result.val[i] & 0x07)<<8 | result.val[i+1]; + int l = (result.val[i+2] & 0x03)<<8 | result.val[i+3]; + int c = (h<<(2+8)) | l; + printf("U+%x\n",c+0x10000); + i+=2; + } else { + printf("U+%x\n",(result.val[i] << 8) | result.val[i+1]); + } + } + hexdump(&result); +#endif + + +#if 1 + convd2 = mbfl_buffer_converter_new(to_encoding, from_encoding, 0); + mbfl_memory_device_init(&dev2, 0, 4096); + mbfl_string_init_set(&string, no_language, to_encoding); + mbfl_memory_device_realloc(&dev2, dev2.length + dev2.allocsz, dev2.allocsz); + + memcpy(dev2.buffer, result.val, result.len+1); + dev2.pos += strlen(dev2.buffer); + + mbfl_memory_device_result(&dev2, &string); + mbfl_string_init_set(&result, no_language, from_encoding); + ret = mbfl_buffer_converter_feed_result(convd2, &string, &result); + hexdump(&result); + mbfl_buffer_converter_delete(convd2); +#endif + mbfl_string_clear(&result); + mbfl_string_clear(&string); + + mbfl_buffer_converter_delete(convd); + + + return EXIT_SUCCESS; +} diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index 57806900f7..4e40e625d4 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -27,6 +27,7 @@ #include "php.h" #include "php_ini.h" #include "php_variables.h" +#include "libmbfl/mbfl/mbfilter_pass.h" #include "mbstring.h" #include "ext/standard/php_string.h" #include "ext/standard/php_mail.h" @@ -56,11 +57,11 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data) const char *c_var; zval *array_ptr; int free_buffer=0; - enum mbfl_no_encoding detected; + const mbfl_encoding *detected; php_mb_encoding_handler_info_t info; if (arg != PARSE_STRING) { - char *value = zend_ini_string("mbstring.internal_encoding", sizeof("mbstring.internal_encoding"), 0); + char *value = MBSTRG(internal_encoding_name); _php_mb_ini_mbstring_internal_encoding_set(value, value ? strlen(value): 0 TSRMLS_CC); } @@ -136,22 +137,21 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data) switch(arg) { case PARSE_POST: - MBSTRG(http_input_identify_post) = mbfl_no_encoding_invalid; + MBSTRG(http_input_identify_post) = NULL; break; case PARSE_GET: - MBSTRG(http_input_identify_get) = mbfl_no_encoding_invalid; + MBSTRG(http_input_identify_get) = NULL; break; case PARSE_COOKIE: - MBSTRG(http_input_identify_cookie) = mbfl_no_encoding_invalid; + MBSTRG(http_input_identify_cookie) = NULL; break; case PARSE_STRING: - MBSTRG(http_input_identify_string) = mbfl_no_encoding_invalid; + MBSTRG(http_input_identify_string) = NULL; break; } info.data_type = arg; info.separator = separator; - info.force_register_globals = 0; info.report_errors = 0; info.to_encoding = MBSTRG(internal_encoding); info.to_language = MBSTRG(language); @@ -164,7 +164,7 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data) detected = _php_mb_encoding_handler_ex(&info, array_ptr, res TSRMLS_CC); MBSTRG(http_input_identify) = detected; - if (detected != mbfl_no_encoding_invalid) { + if (detected) { switch(arg){ case PARSE_POST: MBSTRG(http_input_identify_post) = detected; @@ -192,7 +192,7 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data) /* }}} */ /* {{{ mbfl_no_encoding _php_mb_encoding_handler_ex() */ -enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_info_t *info, zval *arg, char *res TSRMLS_DC) +const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_info_t *info, zval *arg, char *res TSRMLS_DC) { char *var, *val; const char *s1, *s2; @@ -201,21 +201,13 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ int n, num, *len_list = NULL; unsigned int val_len, new_val_len; mbfl_string string, resvar, resval; - enum mbfl_no_encoding from_encoding = mbfl_no_encoding_invalid; + const mbfl_encoding *from_encoding = NULL; mbfl_encoding_detector *identd = NULL; mbfl_buffer_converter *convd = NULL; - int prev_rg_state = 0; - mbfl_string_init_set(&string, info->to_language, info->to_encoding); - mbfl_string_init_set(&resvar, info->to_language, info->to_encoding); - mbfl_string_init_set(&resval, info->to_language, info->to_encoding); - - /* register_globals stuff - * XXX: this feature is going to be deprecated? */ - - if (info->force_register_globals && !(prev_rg_state = PG(register_globals))) { - zend_alter_ini_entry("register_globals", sizeof("register_globals"), "1", sizeof("1")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); - } + mbfl_string_init_set(&string, info->to_language, info->to_encoding->no_encoding); + mbfl_string_init_set(&resvar, info->to_language, info->to_encoding->no_encoding); + mbfl_string_init_set(&resval, info->to_language, info->to_encoding->no_encoding); if (!res || *res == '\0') { goto out; @@ -272,14 +264,14 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ /* initialize converter */ if (info->num_from_encodings <= 0) { - from_encoding = mbfl_no_encoding_pass; + from_encoding = &mbfl_encoding_pass; } else if (info->num_from_encodings == 1) { from_encoding = info->from_encodings[0]; } else { /* auto detect */ - from_encoding = mbfl_no_encoding_invalid; - identd = mbfl_encoding_detector_new((enum mbfl_no_encoding *)info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection)); - if (identd) { + from_encoding = NULL; + identd = mbfl_encoding_detector_new2(info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection)); + if (identd != NULL) { n = 0; while (n < num) { string.val = (unsigned char *)val_list[n]; @@ -289,20 +281,20 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ } n++; } - from_encoding = mbfl_encoding_detector_judge(identd); + from_encoding = mbfl_encoding_detector_judge2(identd); mbfl_encoding_detector_delete(identd); } - if (from_encoding == mbfl_no_encoding_invalid) { + if (!from_encoding) { if (info->report_errors) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to detect encoding"); } - from_encoding = mbfl_no_encoding_pass; + from_encoding = &mbfl_encoding_pass; } } convd = NULL; - if (from_encoding != mbfl_no_encoding_pass) { - convd = mbfl_buffer_converter_new(from_encoding, info->to_encoding, 0); + if (from_encoding != &mbfl_encoding_pass) { + convd = mbfl_buffer_converter_new2(from_encoding, info->to_encoding, 0); if (convd != NULL) { mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); @@ -315,7 +307,7 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ } /* convert encoding */ - string.no_encoding = from_encoding; + string.no_encoding = from_encoding->no_encoding; n = 0; while (n < num) { @@ -327,10 +319,10 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ var = val_list[n]; } n++; - string.val = val_list[n]; + string.val = (unsigned char *)val_list[n]; string.len = len_list[n]; if (convd != NULL && mbfl_buffer_converter_feed_result(convd, &string, &resval) != NULL) { - val = resval.val; + val = (char *)resval.val; val_len = resval.len; } else { val = val_list[n]; @@ -352,11 +344,6 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ } out: - /* register_global stuff */ - if (info->force_register_globals && !prev_rg_state) { - zend_alter_ini_entry("register_globals", sizeof("register_globals"), "0", sizeof("0")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); - } - if (convd != NULL) { MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); mbfl_buffer_converter_delete(convd); @@ -375,14 +362,13 @@ out: /* {{{ SAPI_POST_HANDLER_FUNC(php_mb_post_handler) */ SAPI_POST_HANDLER_FUNC(php_mb_post_handler) { - enum mbfl_no_encoding detected; + const mbfl_encoding *detected; php_mb_encoding_handler_info_t info; - MBSTRG(http_input_identify_post) = mbfl_no_encoding_invalid; + MBSTRG(http_input_identify_post) = NULL; info.data_type = PARSE_POST; info.separator = "&"; - info.force_register_globals = 0; info.report_errors = 0; info.to_encoding = MBSTRG(internal_encoding); info.to_language = MBSTRG(language); @@ -393,7 +379,7 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler) detected = _php_mb_encoding_handler_ex(&info, arg, SG(request_info).post_data TSRMLS_CC); MBSTRG(http_input_identify) = detected; - if (detected != mbfl_no_encoding_invalid) { + if (detected) { MBSTRG(http_input_identify_post) = detected; } } diff --git a/ext/mbstring/mb_gpc.h b/ext/mbstring/mb_gpc.h index 593b413253..ab6fcc86e0 100644 --- a/ext/mbstring/mb_gpc.h +++ b/ext/mbstring/mb_gpc.h @@ -32,13 +32,12 @@ typedef struct _php_mb_encoding_handler_info_t { int data_type; const char *separator; - unsigned int force_register_globals: 1; unsigned int report_errors: 1; enum mbfl_no_language to_language; - enum mbfl_no_encoding to_encoding; + const mbfl_encoding *to_encoding; enum mbfl_no_language from_language; - int num_from_encodings; - const enum mbfl_no_encoding *from_encodings; + const mbfl_encoding **from_encodings; + size_t num_from_encodings; } php_mb_encoding_handler_info_t; /* }}}*/ @@ -48,7 +47,7 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler); MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data); int _php_mb_enable_encoding_translation(int flag); -enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_info_t *info, zval *arg, char *res TSRMLS_DC); +const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_info_t *info, zval *arg, char *res TSRMLS_DC); /* }}} */ #endif /* HAVE_MBSTRING */ diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 0aae6239f9..76654edbf8 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -62,6 +62,7 @@ #include "ext/standard/info.h" #include "libmbfl/mbfl/mbfl_allocators.h" +#include "libmbfl/mbfl/mbfilter_pass.h" #include "php_variables.h" #include "php_globals.h" @@ -77,9 +78,7 @@ #include "php_mbregex.h" #endif -#ifdef ZEND_MULTIBYTE #include "zend_multibyte.h" -#endif /* ZEND_MULTIBYTE */ #if HAVE_ONIG #include "php_onig_compat.h" @@ -98,19 +97,21 @@ ZEND_DECLARE_MODULE_GLOBALS(mbstring) static PHP_GINIT_FUNCTION(mbstring); static PHP_GSHUTDOWN_FUNCTION(mbstring); -#ifdef ZEND_MULTIBYTE -static size_t php_mb_oddlen(const unsigned char *string, size_t length, const char *encoding TSRMLS_DC); -static int php_mb_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const char *encoding_to, const char *encoding_from TSRMLS_DC); -static char* php_mb_encoding_detector(const unsigned char *arg_string, size_t arg_length, char *arg_list TSRMLS_DC); -static int php_mb_set_zend_encoding(TSRMLS_D); -#endif +static void php_mb_populate_current_detect_order_list(TSRMLS_D); + +static int php_mb_encoding_translation(TSRMLS_D); + +static void php_mb_gpc_get_detect_order(const zend_encoding ***list, size_t *list_size TSRMLS_DC); + +static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding TSRMLS_DC); + /* }}} */ /* {{{ php_mb_default_identify_list */ typedef struct _php_mb_nls_ident_list { enum mbfl_no_language lang; - const enum mbfl_no_encoding* list; - int list_size; + const enum mbfl_no_encoding *list; + size_t list_size; } php_mb_nls_ident_list; static const enum mbfl_no_encoding php_mb_default_identify_list_ja[] = { @@ -411,6 +412,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_encode_numericentity, 0, 0, 2) ZEND_ARG_INFO(0, string) ZEND_ARG_INFO(0, convmap) ZEND_ARG_INFO(0, encoding) + ZEND_ARG_INFO(0, is_hex) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_decode_numericentity, 0, 0, 2) @@ -465,6 +467,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_eregi_replace, 0, 0, 3) ZEND_ARG_INFO(0, string) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_replace_callback, 0, 0, 3) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, callback) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, option) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_split, 0, 0, 2) ZEND_ARG_INFO(0, pattern) ZEND_ARG_INFO(0, string) @@ -563,7 +572,7 @@ const zend_function_entry mbstring_functions[] = { /* {{{ zend_module_entry mbstring_module_entry */ zend_module_entry mbstring_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER, "mbstring", mbstring_functions, PHP_MINIT(mbstring), @@ -571,11 +580,11 @@ zend_module_entry mbstring_module_entry = { PHP_RINIT(mbstring), PHP_RSHUTDOWN(mbstring), PHP_MINFO(mbstring), - NO_VERSION_YET, - PHP_MODULE_GLOBALS(mbstring), - PHP_GINIT(mbstring), - PHP_GSHUTDOWN(mbstring), - NULL, + NO_VERSION_YET, + PHP_MODULE_GLOBALS(mbstring), + PHP_GINIT(mbstring), + PHP_GSHUTDOWN(mbstring), + NULL, STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ @@ -653,12 +662,12 @@ static sapi_post_entry mbstr_post_entries[] = { * of parsed encodings. */ static int -php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_encoding **return_list, int *return_size, int persistent TSRMLS_DC) +php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC) { - int n, l, size, bauto, ret = 1; + int size, bauto, ret = SUCCESS; + size_t n; char *p, *p1, *p2, *endp, *tmpstr; - enum mbfl_no_encoding no_encoding; - enum mbfl_no_encoding *src, *entry, *list; + const mbfl_encoding **entry, **list; list = NULL; if (value == NULL || value_length <= 0) { @@ -668,14 +677,8 @@ php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_enc if (return_size) { *return_size = 0; } - return 0; + return FAILURE; } else { - enum mbfl_no_encoding *identify_list; - int identify_list_size; - - identify_list = MBSTRG(default_detect_order_list); - identify_list_size = MBSTRG(default_detect_order_list_size); - /* copy the value string for work */ if (value[0]=='"' && value[value_length-1]=='"' && value_length>2) { tmpstr = (char *)estrndup(value+1, value_length-2); @@ -684,7 +687,7 @@ php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_enc else tmpstr = (char *)estrndup(value, value_length); if (tmpstr == NULL) { - return 0; + return FAILURE; } /* count the number of listed encoding names */ endp = tmpstr + value_length; @@ -694,9 +697,9 @@ php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_enc p1 = p2 + 1; n++; } - size = n + identify_list_size; + size = n + MBSTRG(default_detect_order_list_size); /* make list */ - list = (enum mbfl_no_encoding *)pecalloc(size, sizeof(int), persistent); + list = (const mbfl_encoding **)pecalloc(size, sizeof(mbfl_encoding*), persistent); if (list != NULL) { entry = list; n = 0; @@ -720,19 +723,19 @@ php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_enc /* convert to the encoding number and check encoding */ if (strcasecmp(p1, "auto") == 0) { if (!bauto) { + const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); + const size_t identify_list_size = MBSTRG(default_detect_order_list_size); + size_t i; bauto = 1; - l = identify_list_size; - src = identify_list; - while (l > 0) { - *entry++ = *src++; - l--; + for (i = 0; i < identify_list_size; i++) { + *entry++ = mbfl_no2encoding(*src++); n++; } } } else { - no_encoding = mbfl_name2no_encoding(p1); - if (no_encoding != mbfl_no_encoding_invalid) { - *entry++ = no_encoding; + const mbfl_encoding *encoding = mbfl_name2encoding(p1); + if (encoding) { + *entry++ = encoding; n++; } else { ret = 0; @@ -772,39 +775,26 @@ php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_enc } /* }}} */ -/* {{{ MBSTRING_API php_mb_check_encoding_list */ -MBSTRING_API int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC) { - return php_mb_parse_encoding_list(encoding_list, strlen(encoding_list), NULL, NULL, 0 TSRMLS_CC); -} -/* }}} */ - /* {{{ static int php_mb_parse_encoding_array() * Return 0 if input contains any illegal encoding, otherwise 1. * Even if any illegal encoding is detected the result may contain a list * of parsed encodings. */ static int -php_mb_parse_encoding_array(zval *array, enum mbfl_no_encoding **return_list, int *return_size, int persistent TSRMLS_DC) +php_mb_parse_encoding_array(zval *array, const mbfl_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC) { zval **hash_entry; HashTable *target_hash; - int i, n, l, size, bauto,ret = 1; - enum mbfl_no_encoding no_encoding; - enum mbfl_no_encoding *src, *list, *entry; + int i, n, size, bauto, ret = SUCCESS; + const mbfl_encoding **list, **entry; list = NULL; if (Z_TYPE_P(array) == IS_ARRAY) { - enum mbfl_no_encoding *identify_list; - int identify_list_size; - - identify_list = MBSTRG(default_detect_order_list); - identify_list_size = MBSTRG(default_detect_order_list_size); - target_hash = Z_ARRVAL_P(array); zend_hash_internal_pointer_reset(target_hash); i = zend_hash_num_elements(target_hash); - size = i + identify_list_size; - list = (enum mbfl_no_encoding *)pecalloc(size, sizeof(int), persistent); + size = i + MBSTRG(default_detect_order_list_size); + list = (const mbfl_encoding **)pecalloc(size, sizeof(mbfl_encoding*), persistent); if (list != NULL) { entry = list; bauto = 0; @@ -816,22 +806,23 @@ php_mb_parse_encoding_array(zval *array, enum mbfl_no_encoding **return_list, in convert_to_string_ex(hash_entry); if (strcasecmp(Z_STRVAL_PP(hash_entry), "auto") == 0) { if (!bauto) { + const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); + const size_t identify_list_size = MBSTRG(default_detect_order_list_size); + size_t j; + bauto = 1; - l = identify_list_size; - src = identify_list; - while (l > 0) { - *entry++ = *src++; - l--; + for (j = 0; j < identify_list_size; j++) { + *entry++ = mbfl_no2encoding(*src++); n++; } } } else { - no_encoding = mbfl_name2no_encoding(Z_STRVAL_PP(hash_entry)); - if (no_encoding != mbfl_no_encoding_invalid) { - *entry++ = no_encoding; + const mbfl_encoding *encoding = mbfl_name2encoding(Z_STRVAL_PP(hash_entry)); + if (encoding) { + *entry++ = encoding; n++; } else { - ret = 0; + ret = FAILURE; } } zend_hash_move_forward(target_hash); @@ -848,7 +839,7 @@ php_mb_parse_encoding_array(zval *array, enum mbfl_no_encoding **return_list, in if (return_list) { *return_list = NULL; } - ret = 0; + ret = FAILURE; } if (return_size) { *return_size = n; @@ -860,7 +851,7 @@ php_mb_parse_encoding_array(zval *array, enum mbfl_no_encoding **return_list, in if (return_size) { *return_size = 0; } - ret = 0; + ret = FAILURE; } } @@ -868,6 +859,118 @@ php_mb_parse_encoding_array(zval *array, enum mbfl_no_encoding **return_list, in } /* }}} */ +/* {{{ zend_multibyte interface */ +static const zend_encoding* php_mb_zend_encoding_fetcher(const char *encoding_name TSRMLS_DC) +{ + return (const zend_encoding*)mbfl_name2encoding(encoding_name); +} + +static const char *php_mb_zend_encoding_name_getter(const zend_encoding *encoding) +{ + return ((const mbfl_encoding *)encoding)->name; +} + +static int php_mb_zend_encoding_lexer_compatibility_checker(const zend_encoding *_encoding) +{ + const mbfl_encoding *encoding = (const mbfl_encoding*)_encoding; + if (encoding->flag & MBFL_ENCTYPE_SBCS) { + return 1; + } + if ((encoding->flag & (MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_GL_UNSAFE)) == MBFL_ENCTYPE_MBCS) { + return 1; + } + return 0; +} + +static const zend_encoding *php_mb_zend_encoding_detector(const unsigned char *arg_string, size_t arg_length, const zend_encoding **list, size_t list_size TSRMLS_DC) +{ + mbfl_string string; + + if (!list) { + list = (const zend_encoding **)MBSTRG(current_detect_order_list); + list_size = MBSTRG(current_detect_order_list_size); + } + + mbfl_string_init(&string); + string.no_language = MBSTRG(language); + string.val = (unsigned char *)arg_string; + string.len = arg_length; + return (const zend_encoding *) mbfl_identify_encoding2(&string, (const mbfl_encoding **)list, list_size, 0); +} + +static size_t php_mb_zend_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from TSRMLS_DC) +{ + mbfl_string string, result; + mbfl_buffer_converter *convd; + int status, loc; + + /* new encoding */ + /* initialize string */ + mbfl_string_init(&string); + mbfl_string_init(&result); + string.no_encoding = ((const mbfl_encoding*)encoding_from)->no_encoding; + string.no_language = MBSTRG(language); + string.val = (unsigned char*)from; + string.len = from_length; + + /* initialize converter */ + convd = mbfl_buffer_converter_new2((const mbfl_encoding *)encoding_from, (const mbfl_encoding *)encoding_to, string.len); + if (convd == NULL) { + return -1; + } + mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); + mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); + + /* do it */ + status = mbfl_buffer_converter_feed2(convd, &string, &loc); + if (status) { + mbfl_buffer_converter_delete(convd); + return (size_t)-1; + } + + mbfl_buffer_converter_flush(convd); + if (!mbfl_buffer_converter_result(convd, &result)) { + mbfl_buffer_converter_delete(convd); + return (size_t)-1; + } + + *to = result.val; + *to_length = result.len; + + mbfl_buffer_converter_delete(convd); + + return loc; +} + +static int php_mb_zend_encoding_list_parser(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC) +{ + return php_mb_parse_encoding_list(encoding_list, encoding_list_len, (const mbfl_encoding ***)return_list, return_size, persistent TSRMLS_CC); +} + +static const zend_encoding *php_mb_zend_internal_encoding_getter(TSRMLS_D) +{ + return (const zend_encoding *)MBSTRG(internal_encoding); +} + +static int php_mb_zend_internal_encoding_setter(const zend_encoding *encoding TSRMLS_DC) +{ + MBSTRG(internal_encoding) = (const mbfl_encoding *)encoding; + return SUCCESS; +} + +static zend_multibyte_functions php_mb_zend_multibyte_functions = { + "mbstring", + php_mb_zend_encoding_fetcher, + php_mb_zend_encoding_name_getter, + php_mb_zend_encoding_lexer_compatibility_checker, + php_mb_zend_encoding_detector, + php_mb_zend_encoding_converter, + php_mb_zend_encoding_list_parser, + php_mb_zend_internal_encoding_getter, + php_mb_zend_internal_encoding_setter +}; +/* }}} */ + static void *_php_mb_compile_regex(const char *pattern TSRMLS_DC); static int _php_mb_match_regex(void *opaque, const char *str, size_t str_len); static void _php_mb_free_regex(void *opaque); @@ -942,7 +1045,7 @@ static void _php_mb_free_regex(void *opaque) #endif /* {{{ php_mb_nls_get_default_detect_order_list */ -static int php_mb_nls_get_default_detect_order_list(enum mbfl_no_language lang, enum mbfl_no_encoding **plist, int* plist_size) +static int php_mb_nls_get_default_detect_order_list(enum mbfl_no_language lang, enum mbfl_no_encoding **plist, size_t *plist_size) { size_t i; @@ -960,6 +1063,124 @@ static int php_mb_nls_get_default_detect_order_list(enum mbfl_no_language lang, } /* }}} */ +static char *php_mb_rfc1867_substring_conf(const zend_encoding *encoding, char *start, int len, char quote TSRMLS_DC) +{ + char *result = emalloc(len + 2); + char *resp = result; + int i; + + for (i = 0; i < len && start[i] != quote; ++i) { + if (start[i] == '\\' && (start[i + 1] == '\\' || (quote && start[i + 1] == quote))) { + *resp++ = start[++i]; + } else { + size_t j = php_mb_mbchar_bytes_ex(start+i, (const mbfl_encoding *)encoding); + + while (j-- > 0 && i < len) { + *resp++ = start[i++]; + } + --i; + } + } + + *resp = '\0'; + return result; +} + +static char *php_mb_rfc1867_getword(const zend_encoding *encoding, char **line, char stop TSRMLS_DC) /* {{{ */ +{ + char *pos = *line, quote; + char *res; + + while (*pos && *pos != stop) { + if ((quote = *pos) == '"' || quote == '\'') { + ++pos; + while (*pos && *pos != quote) { + if (*pos == '\\' && pos[1] && pos[1] == quote) { + pos += 2; + } else { + ++pos; + } + } + if (*pos) { + ++pos; + } + } else { + pos += php_mb_mbchar_bytes_ex(pos, (const mbfl_encoding *)encoding); + + } + } + if (*pos == '\0') { + res = estrdup(*line); + *line += strlen(*line); + return res; + } + + res = estrndup(*line, pos - *line); + + while (*pos == stop) { + pos += php_mb_mbchar_bytes_ex(pos, (const mbfl_encoding *)encoding); + } + + *line = pos; + return res; +} +/* }}} */ + +static char *php_mb_rfc1867_getword_conf(const zend_encoding *encoding, char *str TSRMLS_DC) /* {{{ */ +{ + while (*str && isspace(*(unsigned char *)str)) { + ++str; + } + + if (!*str) { + return estrdup(""); + } + + if (*str == '"' || *str == '\'') { + char quote = *str; + + str++; + return php_mb_rfc1867_substring_conf(encoding, str, strlen(str), quote TSRMLS_CC); + } else { + char *strend = str; + + while (*strend && !isspace(*(unsigned char *)strend)) { + ++strend; + } + return php_mb_rfc1867_substring_conf(encoding, str, strend - str, 0 TSRMLS_CC); + } +} +/* }}} */ + +static char *php_mb_rfc1867_basename(const zend_encoding *encoding, char *filename TSRMLS_DC) /* {{{ */ +{ + char *s, *s2; + const size_t filename_len = strlen(filename); + + /* The \ check should technically be needed for win32 systems only where + * it is a valid path separator. However, IE in all it's wisdom always sends + * the full path of the file on the user's filesystem, which means that unless + * the user does basename() they get a bogus file name. Until IE's user base drops + * to nill or problem is fixed this code must remain enabled for all systems. */ + s = php_mb_safe_strrchr_ex(filename, '\\', filename_len, (const mbfl_encoding *)encoding); + s2 = php_mb_safe_strrchr_ex(filename, '/', filename_len, (const mbfl_encoding *)encoding); + + if (s && s2) { + if (s > s2) { + return ++s; + } else { + return ++s2; + } + } else if (s) { + return ++s; + } else if (s2) { + return ++s2; + } else { + return filename; + } +} +/* }}} */ + /* {{{ php.ini directive handler */ /* {{{ static PHP_INI_MH(OnUpdate_mbstring_language) */ static PHP_INI_MH(OnUpdate_mbstring_language) @@ -980,23 +1201,27 @@ static PHP_INI_MH(OnUpdate_mbstring_language) /* {{{ static PHP_INI_MH(OnUpdate_mbstring_detect_order) */ static PHP_INI_MH(OnUpdate_mbstring_detect_order) { - enum mbfl_no_encoding *list; - int size; + const mbfl_encoding **list; + size_t size; - if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { - if (MBSTRG(detect_order_list)) { - free(MBSTRG(detect_order_list)); - } - MBSTRG(detect_order_list) = list; - MBSTRG(detect_order_list_size) = size; - } else { + if (!new_value) { if (MBSTRG(detect_order_list)) { - free(MBSTRG(detect_order_list)); - MBSTRG(detect_order_list) = NULL; + pefree(MBSTRG(detect_order_list), 1); } + MBSTRG(detect_order_list) = NULL; + MBSTRG(detect_order_list_size) = 0; + return SUCCESS; + } + + if (FAILURE == php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { return FAILURE; } + if (MBSTRG(detect_order_list)) { + pefree(MBSTRG(detect_order_list), 1); + } + MBSTRG(detect_order_list) = list; + MBSTRG(detect_order_list_size) = size; return SUCCESS; } /* }}} */ @@ -1004,24 +1229,28 @@ static PHP_INI_MH(OnUpdate_mbstring_detect_order) /* {{{ static PHP_INI_MH(OnUpdate_mbstring_http_input) */ static PHP_INI_MH(OnUpdate_mbstring_http_input) { - enum mbfl_no_encoding *list; - int size; + const mbfl_encoding **list; + size_t size; - if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { - if (MBSTRG(http_input_list)) { - free(MBSTRG(http_input_list)); - } - MBSTRG(http_input_list) = list; - MBSTRG(http_input_list_size) = size; - } else { + if (!new_value) { if (MBSTRG(http_input_list)) { - free(MBSTRG(http_input_list)); - MBSTRG(http_input_list) = NULL; + pefree(MBSTRG(http_input_list), 1); } + MBSTRG(http_input_list) = NULL; MBSTRG(http_input_list_size) = 0; + return SUCCESS; + } + + if (FAILURE == php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { return FAILURE; } + if (MBSTRG(http_input_list)) { + pefree(MBSTRG(http_input_list), 1); + } + MBSTRG(http_input_list) = list; + MBSTRG(http_input_list_size) = size; + return SUCCESS; } /* }}} */ @@ -1029,20 +1258,23 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input) /* {{{ static PHP_INI_MH(OnUpdate_mbstring_http_output) */ static PHP_INI_MH(OnUpdate_mbstring_http_output) { - enum mbfl_no_encoding no_encoding; + const mbfl_encoding *encoding; - no_encoding = mbfl_name2no_encoding(new_value); - if (no_encoding != mbfl_no_encoding_invalid) { - MBSTRG(http_output_encoding) = no_encoding; - MBSTRG(current_http_output_encoding) = no_encoding; - } else { - MBSTRG(http_output_encoding) = mbfl_no_encoding_pass; - MBSTRG(current_http_output_encoding) = mbfl_no_encoding_pass; - if (new_value != NULL && new_value_length > 0) { - return FAILURE; - } + if (new_value == NULL || new_value_length == 0) { + MBSTRG(http_output_encoding) = &mbfl_encoding_pass; + MBSTRG(current_http_output_encoding) = &mbfl_encoding_pass; + return SUCCESS; + } + + encoding = mbfl_name2encoding(new_value); + if (!encoding) { + MBSTRG(http_output_encoding) = &mbfl_encoding_pass; + MBSTRG(current_http_output_encoding) = &mbfl_encoding_pass; + return FAILURE; } + MBSTRG(http_output_encoding) = encoding; + MBSTRG(current_http_output_encoding) = encoding; return SUCCESS; } /* }}} */ @@ -1050,62 +1282,44 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output) /* {{{ static _php_mb_ini_mbstring_internal_encoding_set */ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_value_length TSRMLS_DC) { - enum mbfl_no_encoding no_encoding; - const char *enc_name = NULL; - uint enc_name_len = 0; - - no_encoding = new_value ? mbfl_name2no_encoding(new_value): - mbfl_no_encoding_invalid; - if (no_encoding != mbfl_no_encoding_invalid) { - enc_name = new_value; - enc_name_len = new_value_length; - } else { + const mbfl_encoding *encoding; + + if (!new_value || new_value_length == 0 || !(encoding = mbfl_name2encoding(new_value))) { switch (MBSTRG(language)) { case mbfl_no_language_uni: - enc_name = "UTF-8"; - enc_name_len = sizeof("UTF-8") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_utf8); break; case mbfl_no_language_japanese: - enc_name = "EUC-JP"; - enc_name_len = sizeof("EUC-JP") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_euc_jp); break; case mbfl_no_language_korean: - enc_name = "EUC-KR"; - enc_name_len = sizeof("EUC-KR") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_euc_kr); break; case mbfl_no_language_simplified_chinese: - enc_name = "EUC-CN"; - enc_name_len = sizeof("EUC-CN") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_euc_cn); break; case mbfl_no_language_traditional_chinese: - enc_name = "EUC-TW"; - enc_name_len = sizeof("EUC-TW") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_euc_tw); break; case mbfl_no_language_russian: - enc_name = "KOI8-R"; - enc_name_len = sizeof("KOI8-R") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_koi8r); break; case mbfl_no_language_german: - enc_name = "ISO-8859-15"; - enc_name_len = sizeof("ISO-8859-15") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_8859_15); break; case mbfl_no_language_armenian: - enc_name = "ArmSCII-8"; - enc_name_len = sizeof("ArmSCII-8") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_armscii8); break; case mbfl_no_language_turkish: - enc_name = "ISO-8859-9"; - enc_name_len = sizeof("ISO-8859-9") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_8859_9); break; default: - enc_name = "ISO-8859-1"; - enc_name_len = sizeof("ISO-8859-1") - 1; + encoding = mbfl_no2encoding(mbfl_no_encoding_8859_1); break; } - no_encoding = mbfl_name2no_encoding(enc_name); } - MBSTRG(internal_encoding) = no_encoding; - MBSTRG(current_internal_encoding) = no_encoding; + MBSTRG(internal_encoding) = encoding; + MBSTRG(current_internal_encoding) = encoding; #if HAVE_MBREGEX { const char *enc_name = new_value; @@ -1124,6 +1338,9 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v /* {{{ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) */ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) { + if (OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) { + return FAILURE; + } if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN || stage == PHP_INI_STAGE_RUNTIME) { return _php_mb_ini_mbstring_internal_encoding_set(new_value, new_value_length TSRMLS_CC); @@ -1139,32 +1356,6 @@ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) } /* }}} */ -#ifdef ZEND_MULTIBYTE -/* {{{ static PHP_INI_MH(OnUpdate_mbstring_script_encoding) */ -static PHP_INI_MH(OnUpdate_mbstring_script_encoding) -{ - int *list, size; - - if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { - if (MBSTRG(script_encoding_list) != NULL) { - free(MBSTRG(script_encoding_list)); - } - MBSTRG(script_encoding_list) = list; - MBSTRG(script_encoding_list_size) = size; - } else { - if (MBSTRG(script_encoding_list) != NULL) { - free(MBSTRG(script_encoding_list)); - } - MBSTRG(script_encoding_list) = NULL; - MBSTRG(script_encoding_list_size) = 0; - return FAILURE; - } - - return SUCCESS; -} -/* }}} */ -#endif /* ZEND_MULTIBYTE */ - /* {{{ static PHP_INI_MH(OnUpdate_mbstring_substitute_character) */ static PHP_INI_MH(OnUpdate_mbstring_substitute_character) { @@ -1207,7 +1398,7 @@ static PHP_INI_MH(OnUpdate_mbstring_substitute_character) static PHP_INI_MH(OnUpdate_mbstring_encoding_translation) { if (new_value == NULL) { - return FAILURE; + return FAILURE; } OnUpdateBool(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); @@ -1261,10 +1452,7 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("mbstring.detect_order", NULL, PHP_INI_ALL, OnUpdate_mbstring_detect_order) PHP_INI_ENTRY("mbstring.http_input", "pass", PHP_INI_ALL, OnUpdate_mbstring_http_input) PHP_INI_ENTRY("mbstring.http_output", "pass", PHP_INI_ALL, OnUpdate_mbstring_http_output) - PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_internal_encoding) -#ifdef ZEND_MULTIBYTE - PHP_INI_ENTRY("mbstring.script_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_script_encoding) -#endif /* ZEND_MULTIBYTE */ + STD_PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_internal_encoding, internal_encoding_name, zend_mbstring_globals, mbstring_globals) PHP_INI_ENTRY("mbstring.substitute_character", NULL, PHP_INI_ALL, OnUpdate_mbstring_substitute_character) STD_PHP_INI_ENTRY("mbstring.func_overload", "0", PHP_INI_SYSTEM, OnUpdateLong, func_overload, zend_mbstring_globals, mbstring_globals) @@ -1289,19 +1477,15 @@ PHP_INI_END() static PHP_GINIT_FUNCTION(mbstring) { mbstring_globals->language = mbfl_no_language_uni; - mbstring_globals->internal_encoding = mbfl_no_encoding_invalid; + mbstring_globals->internal_encoding = NULL; mbstring_globals->current_internal_encoding = mbstring_globals->internal_encoding; -#ifdef ZEND_MULTIBYTE - mbstring_globals->script_encoding_list = NULL; - mbstring_globals->script_encoding_list_size = 0; -#endif /* ZEND_MULTIBYTE */ - mbstring_globals->http_output_encoding = mbfl_no_encoding_pass; - mbstring_globals->current_http_output_encoding = mbfl_no_encoding_pass; - mbstring_globals->http_input_identify = mbfl_no_encoding_invalid; - mbstring_globals->http_input_identify_get = mbfl_no_encoding_invalid; - mbstring_globals->http_input_identify_post = mbfl_no_encoding_invalid; - mbstring_globals->http_input_identify_cookie = mbfl_no_encoding_invalid; - mbstring_globals->http_input_identify_string = mbfl_no_encoding_invalid; + mbstring_globals->http_output_encoding = &mbfl_encoding_pass; + mbstring_globals->current_http_output_encoding = &mbfl_encoding_pass; + mbstring_globals->http_input_identify = NULL; + mbstring_globals->http_input_identify_get = NULL; + mbstring_globals->http_input_identify_post = NULL; + mbstring_globals->http_input_identify_cookie = NULL; + mbstring_globals->http_input_identify_string = NULL; mbstring_globals->http_input_list = NULL; mbstring_globals->http_input_list_size = 0; mbstring_globals->detect_order_list = NULL; @@ -1332,11 +1516,6 @@ static PHP_GSHUTDOWN_FUNCTION(mbstring) if (mbstring_globals->http_input_list) { free(mbstring_globals->http_input_list); } -#ifdef ZEND_MULTIBYTE - if (mbstring_globals->script_encoding_list) { - free(mbstring_globals->script_encoding_list); - } -#endif /* ZEND_MULTIBYTE */ if (mbstring_globals->detect_order_list) { free(mbstring_globals->detect_order_list); } @@ -1357,7 +1536,7 @@ PHP_MINIT_FUNCTION(mbstring) REGISTER_INI_ENTRIES(); /* This is a global handler. Should not be set in a per-request handler. */ - sapi_register_treat_data(mbstr_treat_data); + sapi_register_treat_data(mbstr_treat_data TSRMLS_CC); /* Post handlers are stored in the thread-local context. */ if (MBSTRG(encoding_translation)) { @@ -1375,6 +1554,19 @@ PHP_MINIT_FUNCTION(mbstring) #if HAVE_MBREGEX PHP_MINIT(mb_regex) (INIT_FUNC_ARGS_PASSTHRU); #endif + + if (FAILURE == zend_multibyte_set_functions(&php_mb_zend_multibyte_functions TSRMLS_CC)) { + return FAILURE; + } + + php_rfc1867_set_multibyte_callbacks( + php_mb_encoding_translation, + php_mb_gpc_get_detect_order, + php_mb_gpc_set_input_encoding, + php_mb_rfc1867_getword, + php_mb_rfc1867_getword_conf, + php_mb_rfc1867_basename); + return SUCCESS; } /* }}} */ @@ -1383,7 +1575,7 @@ PHP_MINIT_FUNCTION(mbstring) PHP_MSHUTDOWN_FUNCTION(mbstring) { UNREGISTER_INI_ENTRIES(); - + #if HAVE_MBREGEX PHP_MSHUTDOWN(mb_regex) (INIT_FUNC_ARGS_PASSTHRU); #endif @@ -1395,8 +1587,6 @@ PHP_MSHUTDOWN_FUNCTION(mbstring) /* {{{ PHP_RINIT_FUNCTION(mbstring) */ PHP_RINIT_FUNCTION(mbstring) { - int n; - enum mbfl_no_encoding *list=NULL, *entry; zend_function *func, *orig; const struct mb_overload_def *p; @@ -1407,22 +1597,7 @@ PHP_RINIT_FUNCTION(mbstring) MBSTRG(illegalchars) = 0; - n = 0; - if (MBSTRG(detect_order_list)) { - list = MBSTRG(detect_order_list); - n = MBSTRG(detect_order_list_size); - } - if (n <= 0) { - list = MBSTRG(default_detect_order_list); - n = MBSTRG(default_detect_order_list_size); - } - entry = (enum mbfl_no_encoding *)safe_emalloc(n, sizeof(int), 0); - MBSTRG(current_detect_order_list) = entry; - MBSTRG(current_detect_order_list_size) = n; - while (n > 0) { - *entry++ = *list++; - n--; - } + php_mb_populate_current_detect_order_list(TSRMLS_C); /* override original function. */ if (MBSTRG(func_overload)){ @@ -1454,10 +1629,7 @@ PHP_RINIT_FUNCTION(mbstring) #if HAVE_MBREGEX PHP_RINIT(mb_regex) (INIT_FUNC_ARGS_PASSTHRU); #endif -#ifdef ZEND_MULTIBYTE - zend_multibyte_set_internal_encoding(mbfl_no_encoding2name(MBSTRG(internal_encoding)) TSRMLS_CC); - php_mb_set_zend_encoding(TSRMLS_C); -#endif /* ZEND_MULTIBYTE */ + zend_multibyte_set_internal_encoding((const zend_encoding *)MBSTRG(internal_encoding) TSRMLS_CC); return SUCCESS; } @@ -1481,11 +1653,11 @@ PHP_RSHUTDOWN_FUNCTION(mbstring) } /* clear http input identification. */ - MBSTRG(http_input_identify) = mbfl_no_encoding_invalid; - MBSTRG(http_input_identify_post) = mbfl_no_encoding_invalid; - MBSTRG(http_input_identify_get) = mbfl_no_encoding_invalid; - MBSTRG(http_input_identify_cookie) = mbfl_no_encoding_invalid; - MBSTRG(http_input_identify_string) = mbfl_no_encoding_invalid; + MBSTRG(http_input_identify) = NULL; + MBSTRG(http_input_identify_post) = NULL; + MBSTRG(http_input_identify_get) = NULL; + MBSTRG(http_input_identify_cookie) = NULL; + MBSTRG(http_input_identify_string) = NULL; /* clear overloaded function. */ if (MBSTRG(func_overload)){ @@ -1516,7 +1688,12 @@ PHP_MINFO_FUNCTION(mbstring) php_info_print_table_start(); php_info_print_table_row(2, "Multibyte Support", "enabled"); php_info_print_table_row(2, "Multibyte string engine", "libmbfl"); - php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "enabled": "disabled"); + php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "enabled": "disabled"); + { + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%d.%d.%d", MBFL_VERSION_MAJOR, MBFL_VERSION_MINOR, MBFL_VERSION_TEENY); + php_info_print_table_row(2, "libmbfl version", tmp); + } php_info_print_table_end(); php_info_print_table_start(); @@ -1560,33 +1737,27 @@ PHP_FUNCTION(mb_language) Sets the current internal encoding or Returns the current internal encoding as a string */ PHP_FUNCTION(mb_internal_encoding) { - char *name = NULL; + const char *name = NULL; int name_len; - enum mbfl_no_encoding no_encoding; + const mbfl_encoding *encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, &name_len) == FAILURE) { RETURN_FALSE; } if (name == NULL) { - name = (char *)mbfl_no_encoding2name(MBSTRG(current_internal_encoding)); + name = MBSTRG(current_internal_encoding) ? MBSTRG(current_internal_encoding)->name: NULL; if (name != NULL) { RETURN_STRING(name, 1); } else { RETURN_FALSE; } } else { - no_encoding = mbfl_name2no_encoding(name); - if (no_encoding == mbfl_no_encoding_invalid) { + encoding = mbfl_name2encoding(name); + if (!encoding) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", name); RETURN_FALSE; } else { - MBSTRG(current_internal_encoding) = no_encoding; -#ifdef ZEND_MULTIBYTE - /* TODO: make independent from mbstring.encoding_translation? */ - if (MBSTRG(encoding_translation)) { - zend_multibyte_set_internal_encoding(name TSRMLS_CC); - } -#endif /* ZEND_MULTIBYTE */ + MBSTRG(current_internal_encoding) = encoding; RETURN_TRUE; } } @@ -1599,10 +1770,9 @@ PHP_FUNCTION(mb_http_input) { char *typ = NULL; int typ_len; - int retname, n; - char *name, *list, *temp; - enum mbfl_no_encoding *entry; - enum mbfl_no_encoding result = mbfl_no_encoding_invalid; + int retname; + char *list, *temp; + const mbfl_encoding *result = NULL; retname = 1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &typ, &typ_len) == FAILURE) { @@ -1630,40 +1800,38 @@ PHP_FUNCTION(mb_http_input) break; case 'I': case 'i': - array_init(return_value); - entry = MBSTRG(http_input_list); - n = MBSTRG(http_input_list_size); - while (n > 0) { - name = (char *)mbfl_no_encoding2name(*entry); - if (name) { - add_next_index_string(return_value, name, 1); + { + const mbfl_encoding **entry = MBSTRG(http_input_list); + const size_t n = MBSTRG(http_input_list_size); + size_t i; + array_init(return_value); + for (i = 0; i < n; i++) { + add_next_index_string(return_value, (*entry)->name, 1); + entry++; } - entry++; - n--; + retname = 0; } - retname = 0; break; case 'L': case 'l': - entry = MBSTRG(http_input_list); - n = MBSTRG(http_input_list_size); - list = NULL; - while (n > 0) { - name = (char *)mbfl_no_encoding2name(*entry); - if (name) { + { + const mbfl_encoding **entry = MBSTRG(http_input_list); + const size_t n = MBSTRG(http_input_list_size); + size_t i; + list = NULL; + for (i = 0; i < n; i++) { if (list) { temp = list; - spprintf(&list, 0, "%s,%s", temp, name); + spprintf(&list, 0, "%s,%s", temp, (*entry)->name); efree(temp); if (!list) { break; } } else { - list = estrdup(name); + list = estrdup((*entry)->name); } + entry++; } - entry++; - n--; } if (!list) { RETURN_FALSE; @@ -1678,9 +1846,8 @@ PHP_FUNCTION(mb_http_input) } if (retname) { - if (result != mbfl_no_encoding_invalid && - (name = (char *)mbfl_no_encoding2name(result)) != NULL) { - RETVAL_STRING(name, 1); + if (result) { + RETVAL_STRING(result->name, 1); } else { RETVAL_FALSE; } @@ -1692,28 +1859,28 @@ PHP_FUNCTION(mb_http_input) Sets the current output_encoding or returns the current output_encoding as a string */ PHP_FUNCTION(mb_http_output) { - char *name = NULL; + const char *name = NULL; int name_len; - enum mbfl_no_encoding no_encoding; + const mbfl_encoding *encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", (char **)&name, &name_len) == FAILURE) { RETURN_FALSE; } if (name == NULL) { - name = (char *)mbfl_no_encoding2name(MBSTRG(current_http_output_encoding)); + name = MBSTRG(current_http_output_encoding) ? MBSTRG(current_http_output_encoding)->name: NULL; if (name != NULL) { RETURN_STRING(name, 1); } else { RETURN_FALSE; } } else { - no_encoding = mbfl_name2no_encoding(name); - if (no_encoding == mbfl_no_encoding_invalid) { + encoding = mbfl_name2encoding(name); + if (!encoding) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", name); RETURN_FALSE; } else { - MBSTRG(current_http_output_encoding) = no_encoding; + MBSTRG(current_http_output_encoding) = encoding; RETURN_TRUE; } } @@ -1725,32 +1892,26 @@ PHP_FUNCTION(mb_http_output) PHP_FUNCTION(mb_detect_order) { zval **arg1 = NULL; - int n, size; - enum mbfl_no_encoding *list, *entry; - char *name; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|Z", &arg1) == FAILURE) { return; } if (!arg1) { + size_t i; + size_t n = MBSTRG(current_detect_order_list_size); + const mbfl_encoding **entry = MBSTRG(current_detect_order_list); array_init(return_value); - entry = MBSTRG(current_detect_order_list); - n = MBSTRG(current_detect_order_list_size); - while (n > 0) { - name = (char *)mbfl_no_encoding2name(*entry); - if (name) { - add_next_index_string(return_value, name, 1); - } + for (i = 0; i < n; i++) { + add_next_index_string(return_value, (*entry)->name, 1); entry++; - n--; } } else { - list = NULL; - size = 0; + const mbfl_encoding **list = NULL; + size_t size = 0; switch (Z_TYPE_PP(arg1)) { case IS_ARRAY: - if (!php_mb_parse_encoding_array(*arg1, &list, &size, 0 TSRMLS_CC)) { + if (FAILURE == php_mb_parse_encoding_array(*arg1, &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); } @@ -1759,7 +1920,7 @@ PHP_FUNCTION(mb_detect_order) break; default: convert_to_string_ex(arg1); - if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1), &list, &size, 0 TSRMLS_CC)) { + if (FAILURE == php_mb_parse_encoding_list(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1), &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); } @@ -1879,15 +2040,15 @@ PHP_FUNCTION(mb_parse_str) char *encstr = NULL; int encstr_len; php_mb_encoding_handler_info_t info; - enum mbfl_no_encoding detected; + const mbfl_encoding *detected; track_vars_array = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &encstr, &encstr_len, &track_vars_array) == FAILURE) { return; } - /* Clear out the array */ if (track_vars_array != NULL) { + /* Clear out the array */ zval_dtor(track_vars_array); array_init(track_vars_array); } @@ -1896,7 +2057,6 @@ PHP_FUNCTION(mb_parse_str) info.data_type = PARSE_STRING; info.separator = PG(arg_separator).input; - info.force_register_globals = (track_vars_array == NULL); info.report_errors = 1; info.to_encoding = MBSTRG(current_internal_encoding); info.to_language = MBSTRG(language); @@ -1904,11 +2064,20 @@ PHP_FUNCTION(mb_parse_str) info.num_from_encodings = MBSTRG(http_input_list_size); info.from_language = MBSTRG(language); - detected = _php_mb_encoding_handler_ex(&info, track_vars_array, encstr TSRMLS_CC); + if (track_vars_array != NULL) { + detected = _php_mb_encoding_handler_ex(&info, track_vars_array, encstr TSRMLS_CC); + } else { + zval tmp; + if (!EG(active_symbol_table)) { + zend_rebuild_symbol_table(TSRMLS_C); + } + Z_ARRVAL(tmp) = EG(active_symbol_table); + detected = _php_mb_encoding_handler_ex(&info, &tmp, encstr TSRMLS_CC); + } MBSTRG(http_input_identify) = detected; - RETVAL_BOOL(detected != mbfl_no_encoding_invalid); + RETVAL_BOOL(detected); if (encstr != NULL) efree(encstr); } @@ -1924,7 +2093,7 @@ PHP_FUNCTION(mb_output_handler) mbfl_string string, result; const char *charset; char *p; - enum mbfl_no_encoding encoding; + const mbfl_encoding *encoding; int last_feed, len; unsigned char send_text_mimetype = 0; char *s, *mimetype = NULL; @@ -1943,7 +2112,7 @@ PHP_FUNCTION(mb_output_handler) mbfl_buffer_converter_delete(MBSTRG(outconv)); MBSTRG(outconv) = NULL; } - if (encoding == mbfl_no_encoding_pass) { + if (encoding == &mbfl_encoding_pass) { RETURN_STRINGL(arg_string, arg_string_len, 1); } @@ -1965,7 +2134,7 @@ PHP_FUNCTION(mb_output_handler) /* if content-type is not yet set, set it and activate the converter */ if (SG(sapi_headers).send_default_content_type || send_text_mimetype) { - charset = mbfl_no2preferred_mime_name(encoding); + charset = encoding->mime_name; if (charset) { len = spprintf( &p, 0, "Content-Type: %s; charset=%s", mimetype, charset ); if (sapi_add_header(p, len, 0) != FAILURE) { @@ -1973,7 +2142,7 @@ PHP_FUNCTION(mb_output_handler) } } /* activate the converter */ - MBSTRG(outconv) = mbfl_buffer_converter_new(MBSTRG(current_internal_encoding), encoding, 0); + MBSTRG(outconv) = mbfl_buffer_converter_new2(MBSTRG(current_internal_encoding), encoding, 0); if (send_text_mimetype){ efree(mimetype); } @@ -1994,7 +2163,7 @@ PHP_FUNCTION(mb_output_handler) /* feed the string */ mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; string.val = (unsigned char *)arg_string; string.len = arg_string_len; mbfl_buffer_converter_feed(MBSTRG(outconv), &string); @@ -2031,7 +2200,7 @@ PHP_FUNCTION(mb_strlen) string.no_language = MBSTRG(language); if (enc_name == NULL) { - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; } else { string.no_encoding = mbfl_name2no_encoding(enc_name); if (string.no_encoding == mbfl_no_encoding_invalid) { @@ -2058,13 +2227,13 @@ PHP_FUNCTION(mb_strpos) mbfl_string haystack, needle; char *enc_name = NULL; int enc_name_len; - + mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; offset = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) { @@ -2129,9 +2298,9 @@ PHP_FUNCTION(mb_strrpos) mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|Zs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &zoffset, &enc_name, &enc_name_len) == FAILURE) { RETURN_FALSE; @@ -2218,7 +2387,7 @@ PHP_FUNCTION(mb_stripos) int n; long offset; mbfl_string haystack, needle; - char *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; int from_encoding_len; n = -1; offset = 0; @@ -2247,7 +2416,7 @@ PHP_FUNCTION(mb_strripos) int n; long offset; mbfl_string haystack, needle; - const char *from_encoding = mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; int from_encoding_len; n = -1; offset = 0; @@ -2279,9 +2448,9 @@ PHP_FUNCTION(mb_strstr) mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &part, &enc_name, &enc_name_len) == FAILURE) { RETURN_FALSE; @@ -2337,9 +2506,9 @@ PHP_FUNCTION(mb_strrchr) mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name, &enc_name_len) == FAILURE) { RETURN_FALSE; @@ -2392,13 +2561,13 @@ PHP_FUNCTION(mb_stristr) unsigned int from_encoding_len, len, mblen; int n; mbfl_string haystack, needle, result, *ret = NULL; - const char *from_encoding = mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding, &from_encoding_len) == FAILURE) { @@ -2450,13 +2619,13 @@ PHP_FUNCTION(mb_strrichr) zend_bool part = 0; int n, from_encoding_len, len, mblen; mbfl_string haystack, needle, result, *ret = NULL; - char *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->name; mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding, &from_encoding_len) == FAILURE) { @@ -2508,9 +2677,9 @@ PHP_FUNCTION(mb_substr_count) mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|s", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &enc_name, &enc_name_len) == FAILURE) { return; @@ -2546,15 +2715,16 @@ PHP_FUNCTION(mb_substr) char *str, *encoding; long from, len; int mblen, str_len, encoding_len; + zval **z_len = NULL; mbfl_string string, result, *ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|ls", &str, &str_len, &from, &len, &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|Zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { return; } mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (argc == 4) { string.no_encoding = mbfl_name2no_encoding(encoding); @@ -2567,8 +2737,11 @@ PHP_FUNCTION(mb_substr) string.val = (unsigned char *)str; string.len = str_len; - if (argc < 3) { + if (argc < 3 || Z_TYPE_PP(z_len) == IS_NULL) { len = str_len; + } else { + convert_to_long_ex(z_len); + len = Z_LVAL_PP(z_len); } /* measures length */ @@ -2619,13 +2792,14 @@ PHP_FUNCTION(mb_strcut) char *encoding; long from, len; int encoding_len; + zval **z_len = NULL; mbfl_string string, result, *ret; mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|ls", (char **)&string.val, (int **)&string.len, &from, &len, &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|Zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { return; } @@ -2637,8 +2811,11 @@ PHP_FUNCTION(mb_strcut) } } - if (argc < 3) { + if (argc < 3 || Z_TYPE_PP(z_len) == IS_NULL) { len = string.len; + } else { + convert_to_long_ex(z_len); + len = Z_LVAL_PP(z_len); } /* if "from" position is negative, count start position from the end @@ -2686,7 +2863,7 @@ PHP_FUNCTION(mb_strwidth) mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", (char **)&string.val, &string.len, &enc_name, &enc_name_len) == FAILURE) { return; @@ -2725,9 +2902,9 @@ PHP_FUNCTION(mb_strimwidth) mbfl_string_init(&string); mbfl_string_init(&marker); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; marker.no_language = MBSTRG(language); - marker.no_encoding = MBSTRG(current_internal_encoding); + marker.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; marker.val = NULL; marker.len = 0; @@ -2771,9 +2948,10 @@ PHP_FUNCTION(mb_strimwidth) MBSTRING_API char * php_mb_convert_encoding(const char *input, size_t length, const char *_to_encoding, const char *_from_encodings, size_t *output_len TSRMLS_DC) { mbfl_string string, result, *ret; - enum mbfl_no_encoding from_encoding, to_encoding; + const mbfl_encoding *from_encoding, *to_encoding; mbfl_buffer_converter *convd; - int size, *list; + size_t size; + const mbfl_encoding **list; char *output=NULL; if (output_len) { @@ -2784,8 +2962,8 @@ MBSTRING_API char * php_mb_convert_encoding(const char *input, size_t length, co } /* new encoding */ if (_to_encoding && strlen(_to_encoding)) { - to_encoding = mbfl_name2no_encoding(_to_encoding); - if (to_encoding == mbfl_no_encoding_invalid) { + to_encoding = mbfl_name2encoding(_to_encoding); + if (!to_encoding) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", _to_encoding); return NULL; } @@ -2797,7 +2975,7 @@ MBSTRING_API char * php_mb_convert_encoding(const char *input, size_t length, co mbfl_string_init(&string); mbfl_string_init(&result); from_encoding = MBSTRG(current_internal_encoding); - string.no_encoding = from_encoding; + string.no_encoding = from_encoding->no_encoding; string.no_language = MBSTRG(language); string.val = (unsigned char *)input; string.len = length; @@ -2806,20 +2984,20 @@ MBSTRING_API char * php_mb_convert_encoding(const char *input, size_t length, co if (_from_encodings) { list = NULL; size = 0; - php_mb_parse_encoding_list(_from_encodings, strlen(_from_encodings), &list, &size, 0 TSRMLS_CC); + php_mb_parse_encoding_list(_from_encodings, strlen(_from_encodings), &list, &size, 0 TSRMLS_CC); if (size == 1) { from_encoding = *list; - string.no_encoding = from_encoding; + string.no_encoding = from_encoding->no_encoding; } else if (size > 1) { /* auto detect */ - from_encoding = mbfl_identify_encoding_no(&string, list, size, MBSTRG(strict_detection)); - if (from_encoding != mbfl_no_encoding_invalid) { - string.no_encoding = from_encoding; + from_encoding = mbfl_identify_encoding2(&string, list, size, MBSTRG(strict_detection)); + if (from_encoding) { + string.no_encoding = from_encoding->no_encoding; } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to detect character encoding"); - from_encoding = mbfl_no_encoding_pass; + from_encoding = &mbfl_encoding_pass; to_encoding = from_encoding; - string.no_encoding = from_encoding; + string.no_encoding = from_encoding->no_encoding; } } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal character encoding specified"); @@ -2830,7 +3008,7 @@ MBSTRING_API char * php_mb_convert_encoding(const char *input, size_t length, co } /* initialize converter */ - convd = mbfl_buffer_converter_new(from_encoding, to_encoding, string.len); + convd = mbfl_buffer_converter_new2(from_encoding, to_encoding, string.len); if (convd == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create character encoding converter"); return NULL; @@ -2931,7 +3109,8 @@ PHP_FUNCTION(mb_convert_encoding) Returns a case-folded version of sourcestring */ PHP_FUNCTION(mb_convert_case) { - char *str, *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; + char *str; int str_len, from_encoding_len; long case_mode = 0; char *newstr; @@ -2955,7 +3134,8 @@ PHP_FUNCTION(mb_convert_case) */ PHP_FUNCTION(mb_strtoupper) { - char *str, *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; + char *str; int str_len, from_encoding_len; char *newstr; size_t ret_len; @@ -2978,7 +3158,8 @@ PHP_FUNCTION(mb_strtoupper) */ PHP_FUNCTION(mb_strtolower) { - char *str, *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; + char *str; int str_len, from_encoding_len; char *newstr; size_t ret_len; @@ -3006,9 +3187,9 @@ PHP_FUNCTION(mb_detect_encoding) zval *encoding_list; mbfl_string string; - const char *ret; - enum mbfl_no_encoding *elist; - int size, *list; + const mbfl_encoding *ret; + const mbfl_encoding **elist, **list; + size_t size; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|zb", &str, &str_len, &encoding_list, &strict) == FAILURE) { return; @@ -3020,7 +3201,7 @@ PHP_FUNCTION(mb_detect_encoding) if (ZEND_NUM_ARGS() >= 2 && !ZVAL_IS_NULL(encoding_list)) { switch (Z_TYPE_P(encoding_list)) { case IS_ARRAY: - if (!php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) { + if (FAILURE == php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); list = NULL; @@ -3030,7 +3211,7 @@ PHP_FUNCTION(mb_detect_encoding) break; default: convert_to_string(encoding_list); - if (!php_mb_parse_encoding_list(Z_STRVAL_P(encoding_list), Z_STRLEN_P(encoding_list), &list, &size, 0 TSRMLS_CC)) { + if (FAILURE == php_mb_parse_encoding_list(Z_STRVAL_P(encoding_list), Z_STRLEN_P(encoding_list), &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); list = NULL; @@ -3059,7 +3240,7 @@ PHP_FUNCTION(mb_detect_encoding) string.no_language = MBSTRG(language); string.val = (unsigned char *)str; string.len = str_len; - ret = mbfl_identify_encoding_name(&string, elist, size, strict); + ret = mbfl_identify_encoding2(&string, elist, size, strict); if (list != NULL) { efree((void *)list); @@ -3069,7 +3250,7 @@ PHP_FUNCTION(mb_detect_encoding) RETURN_FALSE; } - RETVAL_STRING((char *)ret, 1); + RETVAL_STRING((char *)ret->name, 1); } /* }}} */ @@ -3134,7 +3315,7 @@ PHP_FUNCTION(mb_encode_mimeheader) mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) { return; @@ -3168,7 +3349,7 @@ PHP_FUNCTION(mb_encode_mimeheader) mbfl_string_init(&result); ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent); if (ret != NULL) { - RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */ + RETVAL_STRINGL((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */ } else { RETVAL_FALSE; } @@ -3183,16 +3364,16 @@ PHP_FUNCTION(mb_decode_mimeheader) mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", (char **)&string.val, &string.len) == FAILURE) { return; } mbfl_string_init(&result); - ret = mbfl_mime_header_decode(&string, &result, MBSTRG(current_internal_encoding)); + ret = mbfl_mime_header_decode(&string, &result, MBSTRG(current_internal_encoding)->no_encoding); if (ret != NULL) { - RETVAL_STRINGL((char *)ret->val, ret->len, 0) /* the string is already strdup()'ed */ + RETVAL_STRINGL((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */ } else { RETVAL_FALSE; } @@ -3212,7 +3393,7 @@ PHP_FUNCTION(mb_convert_kana) mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ss", (char **)&string.val, &string.len, &optstr, &optstr_len, &encname, &encname_len) == FAILURE) { return; @@ -3311,21 +3492,22 @@ PHP_FUNCTION(mb_convert_variables) zval ***args, ***stack, **var, **hash_entry, **zfrom_enc; HashTable *target_hash; mbfl_string string, result, *ret; - enum mbfl_no_encoding from_encoding, to_encoding; + const mbfl_encoding *from_encoding, *to_encoding; mbfl_encoding_detector *identd; mbfl_buffer_converter *convd; - int n, to_enc_len, argc, stack_level, stack_max, elistsz; - enum mbfl_no_encoding *elist; - char *name, *to_enc; + int n, to_enc_len, argc, stack_level, stack_max; + size_t elistsz; + const mbfl_encoding **elist; + char *to_enc; void *ptmp; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sZ+", &to_enc, &to_enc_len, &zfrom_enc, &args, &argc) == FAILURE) { return; } /* new encoding */ - to_encoding = mbfl_name2no_encoding(to_enc); - if (to_encoding == mbfl_no_encoding_invalid) { + to_encoding = mbfl_name2encoding(to_enc); + if (!to_encoding) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", to_enc); efree(args); RETURN_FALSE; @@ -3335,7 +3517,7 @@ PHP_FUNCTION(mb_convert_variables) mbfl_string_init(&string); mbfl_string_init(&result); from_encoding = MBSTRG(current_internal_encoding); - string.no_encoding = from_encoding; + string.no_encoding = from_encoding->no_encoding; string.no_language = MBSTRG(language); /* pre-conversion encoding */ @@ -3351,16 +3533,16 @@ PHP_FUNCTION(mb_convert_variables) break; } if (elistsz <= 0) { - from_encoding = mbfl_no_encoding_pass; + from_encoding = &mbfl_encoding_pass; } else if (elistsz == 1) { from_encoding = *elist; } else { /* auto detect */ - from_encoding = mbfl_no_encoding_invalid; + from_encoding = NULL; stack_max = PHP_MBSTR_STACK_BLOCK_SIZE; stack = (zval ***)safe_emalloc(stack_max, sizeof(zval **), 0); stack_level = 0; - identd = mbfl_encoding_detector_new(elist, elistsz, MBSTRG(strict_detection)); + identd = mbfl_encoding_detector_new2(elist, elistsz, MBSTRG(strict_detection)); if (identd != NULL) { n = 0; while (n < argc || stack_level > 0) { @@ -3413,14 +3595,14 @@ PHP_FUNCTION(mb_convert_variables) } } detect_end: - from_encoding = mbfl_encoding_detector_judge(identd); + from_encoding = mbfl_encoding_detector_judge2(identd); mbfl_encoding_detector_delete(identd); } efree(stack); - if (from_encoding == mbfl_no_encoding_invalid) { + if (!from_encoding) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to detect encoding"); - from_encoding = mbfl_no_encoding_pass; + from_encoding = &mbfl_encoding_pass; } } if (elist != NULL) { @@ -3428,8 +3610,8 @@ detect_end: } /* create converter */ convd = NULL; - if (from_encoding != mbfl_no_encoding_pass) { - convd = mbfl_buffer_converter_new(from_encoding, to_encoding, 0); + if (from_encoding != &mbfl_encoding_pass) { + convd = mbfl_buffer_converter_new2(from_encoding, to_encoding, 0); if (convd == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create converter"); RETURN_FALSE; @@ -3511,9 +3693,8 @@ detect_end: efree(args); - name = (char *)mbfl_no_encoding2name(from_encoding); - if (name != NULL) { - RETURN_STRING(name, 1); + if (from_encoding) { + RETURN_STRING(from_encoding->name, 1); } else { RETURN_FALSE; } @@ -3531,21 +3712,22 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) HashTable *target_hash; size_t argc = ZEND_NUM_ARGS(); int i, *convmap, *mapelm, mapsize=0; + zend_bool is_hex = 0; mbfl_string string, result, *ret; enum mbfl_no_encoding no_encoding; - if (zend_parse_parameters(argc TSRMLS_CC, "szs", &str, &str_len, &zconvmap, &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) { return; } mbfl_string_init(&string); string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; string.val = (unsigned char *)str; string.len = str_len; /* encoding */ - if (argc == 3) { + if ((argc == 3 || argc == 4) && encoding_len > 0) { no_encoding = mbfl_name2no_encoding(encoding); if (no_encoding == mbfl_no_encoding_invalid) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", encoding); @@ -3555,6 +3737,12 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) } } + if (argc == 4) { + if (type == 0 && is_hex) { + type = 2; /* output in hex format */ + } + } + /* conversion map */ convmap = NULL; if (Z_TYPE_P(zconvmap) == IS_ARRAY) { @@ -3592,7 +3780,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) } /* }}} */ -/* {{{ proto string mb_encode_numericentity(string string, array convmap [, string encoding]) +/* {{{ proto string mb_encode_numericentity(string string, array convmap [, string encoding [, bool is_hex]]) Converts specified characters to HTML numeric entities */ PHP_FUNCTION(mb_encode_numericentity) { @@ -3852,9 +4040,9 @@ PHP_FUNCTION(mb_send_mail) mbfl_string orig_str, conv_str; mbfl_string *pstr; /* pointer to mbfl string for return value */ enum mbfl_no_encoding - tran_cs, /* transfar text charset */ - head_enc, /* header transfar encoding */ - body_enc; /* body transfar encoding */ + tran_cs, /* transfar text charset */ + head_enc, /* header transfar encoding */ + body_enc; /* body transfar encoding */ mbfl_memory_device device; /* automatic allocateable buffer for additional header */ const mbfl_language *lang; int err = 0; @@ -3862,12 +4050,7 @@ PHP_FUNCTION(mb_send_mail) smart_str *s; extern void mbfl_memory_device_unput(mbfl_memory_device *device); char *pp, *ee; - - if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE."); - RETURN_FALSE; - } - + /* initialize */ mbfl_memory_device_init(&device, 0, 0); mbfl_string_init(&orig_str); @@ -3966,15 +4149,15 @@ PHP_FUNCTION(mb_send_mail) /* To: */ if (to != NULL) { - if (to_len > 0) { - to_r = estrndup(to, to_len); - for (; to_len; to_len--) { - if (!isspace((unsigned char) to_r[to_len - 1])) { - break; - } - to_r[to_len - 1] = '\0'; - } - for (i = 0; to_r[i]; i++) { + if (to_len > 0) { + to_r = estrndup(to, to_len); + for (; to_len; to_len--) { + if (!isspace((unsigned char) to_r[to_len - 1])) { + break; + } + to_r[to_len - 1] = '\0'; + } + for (i = 0; to_r[i]; i++) { if (iscntrl((unsigned char) to_r[i])) { /* According to RFC 822, section 3.1.1 long headers may be separated into * parts using CRLF followed at least one linear-white-space character ('\t' or ' '). @@ -3984,11 +4167,11 @@ PHP_FUNCTION(mb_send_mail) SKIP_LONG_HEADER_SEP_MBSTRING(to_r, i); to_r[i] = ' '; } - } - } else { - to_r = to; - } - } else { + } + } else { + to_r = to; + } + } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing To: field"); err = 1; } @@ -3998,10 +4181,10 @@ PHP_FUNCTION(mb_send_mail) orig_str.no_language = MBSTRG(language); orig_str.val = (unsigned char *)subject; orig_str.len = subject_len; - orig_str.no_encoding = MBSTRG(current_internal_encoding); - if (orig_str.no_encoding == mbfl_no_encoding_invalid - || orig_str.no_encoding == mbfl_no_encoding_pass) { - orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + orig_str.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; + if (orig_str.no_encoding == mbfl_no_encoding_invalid || orig_str.no_encoding == mbfl_no_encoding_pass) { + const mbfl_encoding *encoding = mbfl_identify_encoding2(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + orig_str.no_encoding = encoding ? encoding->no_encoding: mbfl_no_encoding_invalid; } pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, head_enc, "\n", sizeof("Subject: [PHP-jp nnnnnnnn]")); if (pstr != NULL) { @@ -4017,11 +4200,11 @@ PHP_FUNCTION(mb_send_mail) orig_str.no_language = MBSTRG(language); orig_str.val = (unsigned char *)message; orig_str.len = (unsigned int)message_len; - orig_str.no_encoding = MBSTRG(current_internal_encoding); + orig_str.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; - if (orig_str.no_encoding == mbfl_no_encoding_invalid - || orig_str.no_encoding == mbfl_no_encoding_pass) { - orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + if (orig_str.no_encoding == mbfl_no_encoding_invalid || orig_str.no_encoding == mbfl_no_encoding_pass) { + const mbfl_encoding *encoding = mbfl_identify_encoding2(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); + orig_str.no_encoding = encoding ? encoding->no_encoding: mbfl_no_encoding_invalid; } pstr = NULL; @@ -4129,15 +4312,13 @@ PHP_FUNCTION(mb_send_mail) PHP_FUNCTION(mb_get_info) { char *typ = NULL; - int typ_len, n; + int typ_len; + size_t n; char *name; const struct mb_overload_def *over_func; zval *row1, *row2; const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); - enum mbfl_no_encoding *entry; -#ifdef ZEND_MULTIBYTE - zval *row3; -#endif /* ZEND_MULTIBYTE */ + const mbfl_encoding **entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &typ, &typ_len) == FAILURE) { RETURN_FALSE; @@ -4145,14 +4326,14 @@ PHP_FUNCTION(mb_get_info) if (!typ || !strcasecmp("all", typ)) { array_init(return_value); - if ((name = (char *)mbfl_no_encoding2name(MBSTRG(current_internal_encoding))) != NULL) { - add_assoc_string(return_value, "internal_encoding", name, 1); + if (MBSTRG(current_internal_encoding)) { + add_assoc_string(return_value, "internal_encoding", (char *)MBSTRG(current_internal_encoding)->name, 1); } - if ((name = (char *)mbfl_no_encoding2name(MBSTRG(http_input_identify))) != NULL) { - add_assoc_string(return_value, "http_input", name, 1); + if (MBSTRG(http_input_identify)) { + add_assoc_string(return_value, "http_input", (char *)MBSTRG(http_input_identify)->name, 1); } - if ((name = (char *)mbfl_no_encoding2name(MBSTRG(current_http_output_encoding))) != NULL) { - add_assoc_string(return_value, "http_output", name, 1); + if (MBSTRG(current_http_output_encoding)) { + add_assoc_string(return_value, "http_output", (char *)MBSTRG(current_http_output_encoding)->name, 1); } if ((name = (char *)zend_ini_string("mbstring.http_output_conv_mimetypes", sizeof("mbstring.http_output_conv_mimetypes"), 0)) != NULL) { add_assoc_string(return_value, "http_output_conv_mimetypes", name, 1); @@ -4194,15 +4375,13 @@ PHP_FUNCTION(mb_get_info) } n = MBSTRG(current_detect_order_list_size); entry = MBSTRG(current_detect_order_list); - if(n > 0) { + if (n > 0) { + size_t i; MAKE_STD_ZVAL(row2); array_init(row2); - while (n > 0) { - if ((name = (char *)mbfl_no_encoding2name(*entry)) != NULL) { - add_next_index_string(row2, name, 1); - } + for (i = 0; i < n; i++) { + add_next_index_string(row2, (*entry)->name, 1); entry++; - n--; } add_assoc_zval(return_value, "detect_order", row2); } @@ -4220,33 +4399,17 @@ PHP_FUNCTION(mb_get_info) } else { add_assoc_string(return_value, "strict_detection", "Off", 1); } -#ifdef ZEND_MULTIBYTE - entry = MBSTRG(script_encoding_list); - n = MBSTRG(script_encoding_list_size); - if(n > 0) { - MAKE_STD_ZVAL(row3); - array_init(row3); - while (n > 0) { - if ((name = (char *)mbfl_no_encoding2name(*entry)) != NULL) { - add_next_index_string(row3, name, 1); - } - entry++; - n--; - } - add_assoc_zval(return_value, "script_encoding", row3); - } -#endif /* ZEND_MULTIBYTE */ } else if (!strcasecmp("internal_encoding", typ)) { - if ((name = (char *)mbfl_no_encoding2name(MBSTRG(current_internal_encoding))) != NULL) { - RETVAL_STRING(name, 1); + if (MBSTRG(current_internal_encoding)) { + RETVAL_STRING((char *)MBSTRG(current_internal_encoding)->name, 1); } } else if (!strcasecmp("http_input", typ)) { - if ((name = (char *)mbfl_no_encoding2name(MBSTRG(http_input_identify))) != NULL) { - RETVAL_STRING(name, 1); + if (MBSTRG(http_input_identify)) { + RETVAL_STRING((char *)MBSTRG(http_input_identify)->name, 1); } } else if (!strcasecmp("http_output", typ)) { - if ((name = (char *)mbfl_no_encoding2name(MBSTRG(current_http_output_encoding))) != NULL) { - RETVAL_STRING(name, 1); + if (MBSTRG(current_http_output_encoding)) { + RETVAL_STRING((char *)MBSTRG(current_http_output_encoding)->name, 1); } } else if (!strcasecmp("http_output_conv_mimetypes", typ)) { if ((name = (char *)zend_ini_string("mbstring.http_output_conv_mimetypes", sizeof("mbstring.http_output_conv_mimetypes"), 0)) != NULL) { @@ -4294,15 +4457,12 @@ PHP_FUNCTION(mb_get_info) } else if (!strcasecmp("detect_order", typ)) { n = MBSTRG(current_detect_order_list_size); entry = MBSTRG(current_detect_order_list); - if(n > 0) { + if (n > 0) { + size_t i; array_init(return_value); - while (n > 0) { - name = (char *)mbfl_no_encoding2name(*entry); - if (name) { - add_next_index_string(return_value, name, 1); - } + for (i = 0; i < n; i++) { + add_next_index_string(return_value, (*entry)->name, 1); entry++; - n--; } } } else if (!strcasecmp("substitute_character", typ)) { @@ -4322,24 +4482,6 @@ PHP_FUNCTION(mb_get_info) RETVAL_STRING("Off", 1); } } else { -#ifdef ZEND_MULTIBYTE - if (!strcasecmp("script_encoding", typ)) { - entry = MBSTRG(script_encoding_list); - n = MBSTRG(script_encoding_list_size); - if(n > 0) { - array_init(return_value); - while (n > 0) { - name = (char *)mbfl_no_encoding2name(*entry); - if (name) { - add_next_index_string(return_value, name, 1); - } - entry++; - n--; - } - } - return; - } -#endif /* ZEND_MULTIBYTE */ RETURN_FALSE; } } @@ -4354,7 +4496,7 @@ PHP_FUNCTION(mb_check_encoding) char *enc = NULL; int enc_len; mbfl_buffer_converter *convd; - enum mbfl_no_encoding no_encoding = MBSTRG(current_internal_encoding); + const mbfl_encoding *encoding = MBSTRG(current_internal_encoding); mbfl_string string, result, *ret = NULL; long illegalchars = 0; @@ -4367,23 +4509,23 @@ PHP_FUNCTION(mb_check_encoding) } if (enc != NULL) { - no_encoding = mbfl_name2no_encoding(enc); - if (no_encoding == mbfl_no_encoding_invalid || no_encoding == mbfl_no_encoding_pass) { + encoding = mbfl_name2encoding(enc); + if (!encoding || encoding == &mbfl_encoding_pass) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid encoding \"%s\"", enc); RETURN_FALSE; } } - - convd = mbfl_buffer_converter_new(no_encoding, no_encoding, 0); + + convd = mbfl_buffer_converter_new2(encoding, encoding, 0); if (convd == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create converter"); RETURN_FALSE; } mbfl_buffer_converter_illegal_mode(convd, MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE); mbfl_buffer_converter_illegal_substchar(convd, 0); - + /* initialize string */ - mbfl_string_init_set(&string, mbfl_no_language_neutral, no_encoding); + mbfl_string_init_set(&string, mbfl_no_language_neutral, encoding->no_encoding); mbfl_string_init(&result); string.val = (unsigned char *)var; @@ -4402,8 +4544,36 @@ PHP_FUNCTION(mb_check_encoding) } /* }}} */ -/* {{{ MBSTRING_API int php_mb_encoding_translation() */ -MBSTRING_API int php_mb_encoding_translation(TSRMLS_D) + +/* {{{ php_mb_populate_current_detect_order_list */ +static void php_mb_populate_current_detect_order_list(TSRMLS_D) +{ + const mbfl_encoding **entry = 0; + size_t nentries; + + if (MBSTRG(current_detect_order_list)) { + return; + } + + if (MBSTRG(detect_order_list) && MBSTRG(detect_order_list_size)) { + nentries = MBSTRG(detect_order_list_size); + entry = (const mbfl_encoding **)safe_emalloc(nentries, sizeof(mbfl_encoding*), 0); + memcpy(entry, MBSTRG(detect_order_list), sizeof(mbfl_encoding*) * nentries); + } else { + const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); + size_t i; + nentries = MBSTRG(default_detect_order_list_size); + entry = (const mbfl_encoding **)safe_emalloc(nentries, sizeof(mbfl_encoding*), 0); + for (i = 0; i < nentries; i++) { + entry[i] = mbfl_no2encoding(src[i]); + } + } + MBSTRG(current_detect_order_list) = entry; + MBSTRG(current_detect_order_list_size) = nentries; +} + +/* {{{ static int php_mb_encoding_translation() */ +static int php_mb_encoding_translation(TSRMLS_D) { return MBSTRG(encoding_translation); } @@ -4430,8 +4600,7 @@ MBSTRING_API size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *e /* {{{ MBSTRING_API size_t php_mb_mbchar_bytes() */ MBSTRING_API size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC) { - return php_mb_mbchar_bytes_ex(s, - mbfl_no2encoding(MBSTRG(internal_encoding))); + return php_mb_mbchar_bytes_ex(s, MBSTRG(internal_encoding)); } /* }}} */ @@ -4479,172 +4648,7 @@ MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t /* {{{ MBSTRING_API char *php_mb_safe_strrchr() */ MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes TSRMLS_DC) { - return php_mb_safe_strrchr_ex(s, c, nbytes, - mbfl_no2encoding(MBSTRG(internal_encoding))); -} -/* }}} */ - -/* {{{ MBSTRING_API char *php_mb_strrchr() */ -MBSTRING_API char *php_mb_strrchr(const char *s, char c TSRMLS_DC) -{ - return php_mb_safe_strrchr(s, c, -1 TSRMLS_CC); -} -/* }}} */ - -/* {{{ MBSTRING_API size_t php_mb_gpc_mbchar_bytes() */ -MBSTRING_API size_t php_mb_gpc_mbchar_bytes(const char *s TSRMLS_DC) -{ - - if (MBSTRG(http_input_identify) != mbfl_no_encoding_invalid){ - return php_mb_mbchar_bytes_ex(s, - mbfl_no2encoding(MBSTRG(http_input_identify))); - } else { - return php_mb_mbchar_bytes_ex(s, - mbfl_no2encoding(MBSTRG(internal_encoding))); - } -} -/* }}} */ - -/* {{{ MBSTRING_API int php_mb_gpc_encoding_converter() */ -MBSTRING_API int php_mb_gpc_encoding_converter(char **str, int *len, int num, const char *encoding_to, const char *encoding_from TSRMLS_DC) -{ - int i; - mbfl_string string, result, *ret = NULL; - enum mbfl_no_encoding from_encoding, to_encoding; - mbfl_buffer_converter *convd; - - if (encoding_to) { - /* new encoding */ - to_encoding = mbfl_name2no_encoding(encoding_to); - if (to_encoding == mbfl_no_encoding_invalid) { - return -1; - } - } else { - to_encoding = MBSTRG(current_internal_encoding); - } - if (encoding_from) { - /* old encoding */ - from_encoding = mbfl_name2no_encoding(encoding_from); - if (from_encoding == mbfl_no_encoding_invalid) { - return -1; - } - } else { - from_encoding = MBSTRG(http_input_identify); - } - - if (from_encoding == mbfl_no_encoding_pass) { - return 0; - } - - /* initialize string */ - mbfl_string_init(&string); - mbfl_string_init(&result); - string.no_encoding = from_encoding; - string.no_language = MBSTRG(language); - - for (i=0; i<num; i++){ - string.val = (unsigned char *)str[i]; - string.len = len[i]; - - /* initialize converter */ - convd = mbfl_buffer_converter_new(from_encoding, to_encoding, string.len); - if (convd == NULL) { - return -1; - } - mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); - mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); - - /* do it */ - ret = mbfl_buffer_converter_feed_result(convd, &string, &result); - if (ret != NULL) { - efree(str[i]); - str[i] = (char *)ret->val; - len[i] = (int)ret->len; - } - - MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); - mbfl_buffer_converter_delete(convd); - } - - return ret ? 0 : -1; -} -/* }}} */ - -/* {{{ MBSTRING_API int php_mb_gpc_encoding_detector() - */ -MBSTRING_API int php_mb_gpc_encoding_detector(char **arg_string, int *arg_length, int num, char *arg_list TSRMLS_DC) -{ - mbfl_string string; - enum mbfl_no_encoding *elist; - enum mbfl_no_encoding encoding = mbfl_no_encoding_invalid; - mbfl_encoding_detector *identd = NULL; - - int size; - enum mbfl_no_encoding *list; - - if (MBSTRG(http_input_list_size) == 1 && - MBSTRG(http_input_list)[0] == mbfl_no_encoding_pass) { - MBSTRG(http_input_identify) = mbfl_no_encoding_pass; - return SUCCESS; - } - - if (MBSTRG(http_input_list_size) == 1 && - MBSTRG(http_input_list)[0] != mbfl_no_encoding_auto && - mbfl_no_encoding2name(MBSTRG(http_input_list)[0]) != NULL) { - MBSTRG(http_input_identify) = MBSTRG(http_input_list)[0]; - return SUCCESS; - } - - if (arg_list && strlen(arg_list)>0) { - /* make encoding list */ - list = NULL; - size = 0; - php_mb_parse_encoding_list(arg_list, strlen(arg_list), &list, &size, 0 TSRMLS_CC); - - if (size > 0 && list != NULL) { - elist = list; - } else { - elist = MBSTRG(current_detect_order_list); - size = MBSTRG(current_detect_order_list_size); - if (size <= 0){ - elist = MBSTRG(default_detect_order_list); - size = MBSTRG(default_detect_order_list_size); - } - } - } else { - elist = MBSTRG(current_detect_order_list); - size = MBSTRG(current_detect_order_list_size); - if (size <= 0){ - elist = MBSTRG(default_detect_order_list); - size = MBSTRG(default_detect_order_list_size); - } - } - - mbfl_string_init(&string); - string.no_language = MBSTRG(language); - - identd = mbfl_encoding_detector_new(elist, size, MBSTRG(strict_detection)); - - if (identd) { - int n = 0; - while(n < num){ - string.val = (unsigned char *)arg_string[n]; - string.len = arg_length[n]; - if (mbfl_encoding_detector_feed(identd, &string)) { - break; - } - n++; - } - encoding = mbfl_encoding_detector_judge(identd); - mbfl_encoding_detector_delete(identd); - } - - if (encoding != mbfl_no_encoding_invalid) { - MBSTRG(http_input_identify) = encoding; - return SUCCESS; - } else { - return FAILURE; - } + return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding)); } /* }}} */ @@ -4659,9 +4663,9 @@ MBSTRING_API int php_mb_stripos(int mode, const char *old_haystack, unsigned int mbfl_string_init(&haystack); mbfl_string_init(&needle); haystack.no_language = MBSTRG(language); - haystack.no_encoding = MBSTRG(current_internal_encoding); + haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; needle.no_language = MBSTRG(language); - needle.no_encoding = MBSTRG(current_internal_encoding); + needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; do { size_t len = 0; @@ -4725,165 +4729,18 @@ MBSTRING_API int php_mb_stripos(int mode, const char *old_haystack, unsigned int } /* }}} */ -#ifdef ZEND_MULTIBYTE -/* {{{ php_mb_set_zend_encoding() */ -static int php_mb_set_zend_encoding(TSRMLS_D) +static void php_mb_gpc_get_detect_order(const zend_encoding ***list, size_t *list_size TSRMLS_DC) /* {{{ */ { - /* 'd better use mbfl_memory_device? */ - char *name, *list = NULL; - int n, *entry, list_size = 0; - zend_encoding_detector encoding_detector; - zend_encoding_converter encoding_converter; - zend_encoding_oddlen encoding_oddlen; - - /* notify script encoding to Zend Engine */ - entry = MBSTRG(script_encoding_list); - n = MBSTRG(script_encoding_list_size); - while (n > 0) { - name = (char *)mbfl_no_encoding2name(*entry); - if (name) { - list_size += strlen(name) + 1; - if (!list) { - list = (char*)emalloc(list_size); - *list = '\0'; - } else { - list = (char*)erealloc(list, list_size); - strcat(list, ","); - } - strcat(list, name); - } - entry++; - n--; - } - zend_multibyte_set_script_encoding(list, (list ? strlen(list) : 0) TSRMLS_CC); - if (list) { - efree(list); - } - encoding_detector = php_mb_encoding_detector; - encoding_converter = php_mb_encoding_converter; - encoding_oddlen = php_mb_oddlen; - - /* TODO: make independent from mbstring.encoding_translation? */ - if (MBSTRG(encoding_translation)) { - /* notify internal encoding to Zend Engine */ - name = (char*)mbfl_no_encoding2name(MBSTRG(current_internal_encoding)); - zend_multibyte_set_internal_encoding(name TSRMLS_CC); - } - - zend_multibyte_set_functions(encoding_detector, encoding_converter, encoding_oddlen TSRMLS_CC); - - return 0; + *list = (const zend_encoding **)MBSTRG(http_input_list); + *list_size = MBSTRG(http_input_list_size); } /* }}} */ -/* {{{ char *php_mb_encoding_detector() - * Interface for Zend Engine - */ -static char* php_mb_encoding_detector(const unsigned char *arg_string, size_t arg_length, char *arg_list TSRMLS_DC) +static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding TSRMLS_DC) /* {{{ */ { - mbfl_string string; - const char *ret; - enum mbfl_no_encoding *elist; - int size, *list; - - /* make encoding list */ - list = NULL; - size = 0; - php_mb_parse_encoding_list(arg_list, strlen(arg_list), &list, &size, 0 TSRMLS_CC); - if (size <= 0) { - return NULL; - } - if (size > 0 && list != NULL) { - elist = list; - } else { - elist = MBSTRG(current_detect_order_list); - size = MBSTRG(current_detect_order_list_size); - } - - mbfl_string_init(&string); - string.no_language = MBSTRG(language); - string.val = (unsigned char *)arg_string; - string.len = arg_length; - ret = mbfl_identify_encoding_name(&string, elist, size, 0); - if (list != NULL) { - efree((void *)list); - } - if (ret != NULL) { - return estrdup(ret); - } else { - return NULL; - } -} -/* }}} */ - -/* {{{ int php_mb_encoding_converter() */ -static int php_mb_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const char *encoding_to, const char *encoding_from TSRMLS_DC) -{ - mbfl_string string, result, *ret; - enum mbfl_no_encoding from_encoding, to_encoding; - mbfl_buffer_converter *convd; - - /* new encoding */ - to_encoding = mbfl_name2no_encoding(encoding_to); - if (to_encoding == mbfl_no_encoding_invalid) { - return -1; - } - /* old encoding */ - from_encoding = mbfl_name2no_encoding(encoding_from); - if (from_encoding == mbfl_no_encoding_invalid) { - return -1; - } - /* initialize string */ - mbfl_string_init(&string); - mbfl_string_init(&result); - string.no_encoding = from_encoding; - string.no_language = MBSTRG(language); - string.val = (unsigned char*)from; - string.len = from_length; - - /* initialize converter */ - convd = mbfl_buffer_converter_new(from_encoding, to_encoding, string.len); - if (convd == NULL) { - return -1; - } - mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); - mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); - - /* do it */ - ret = mbfl_buffer_converter_feed_result(convd, &string, &result); - if (ret != NULL) { - *to = ret->val; - *to_length = ret->len; - } - - MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); - mbfl_buffer_converter_delete(convd); - - return ret ? 0 : -1; -} -/* }}} */ - -/* {{{ int php_mb_oddlen() - * returns number of odd (e.g. appears only first byte of multibyte - * character) chars - */ -static size_t php_mb_oddlen(const unsigned char *string, size_t length, const char *encoding TSRMLS_DC) -{ - mbfl_string mb_string; - - mbfl_string_init(&mb_string); - mb_string.no_language = MBSTRG(language); - mb_string.no_encoding = mbfl_name2no_encoding(encoding); - mb_string.val = (unsigned char *)string; - mb_string.len = length; - - if (mb_string.no_encoding == mbfl_no_encoding_invalid) { - return 0; - } - return mbfl_oddlen(&mb_string); + MBSTRG(http_input_identify) = (const mbfl_encoding*)encoding; } /* }}} */ -#endif /* ZEND_MULTIBYTE */ #endif /* HAVE_MBSTRING */ diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 44694e15d6..15f5d79190 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -128,13 +128,10 @@ PHP_FUNCTION(mb_send_mail); PHP_FUNCTION(mb_get_info); PHP_FUNCTION(mb_check_encoding); -MBSTRING_API int php_mb_encoding_translation(TSRMLS_D); - MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, const mbfl_encoding *enc); MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes TSRMLS_DC); -MBSTRING_API char *php_mb_strrchr(const char *s, char c TSRMLS_DC); MBSTRING_API char * php_mb_convert_encoding(const char *input, size_t length, const char *_to_encoding, @@ -146,45 +143,36 @@ MBSTRING_API int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC) MBSTRING_API size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *enc); MBSTRING_API size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC); -MBSTRING_API size_t php_mb_gpc_mbchar_bytes(const char *s TSRMLS_DC); - MBSTRING_API int php_mb_encoding_detector_ex(const char *arg_string, int arg_length, char *arg_list TSRMLS_DC); MBSTRING_API int php_mb_encoding_converter_ex(char **str, int *len, const char *encoding_to, const char *encoding_from TSRMLS_DC); -MBSTRING_API int php_mb_gpc_encoding_converter(char **str, int *len, int num, const char *encoding_to, const char *encoding_from TSRMLS_DC); - -MBSTRING_API int php_mb_gpc_encoding_detector(char **arg_string, int *arg_length, int num, char *arg_list TSRMLS_DC); - MBSTRING_API int php_mb_stripos(int mode, const char *old_haystack, unsigned int old_haystack_len, const char *old_needle, unsigned int old_needle_len, long offset, const char *from_encoding TSRMLS_DC); /* internal use only */ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_value_length TSRMLS_DC); ZEND_BEGIN_MODULE_GLOBALS(mbstring) + char *internal_encoding_name; enum mbfl_no_language language; - enum mbfl_no_encoding internal_encoding; - enum mbfl_no_encoding current_internal_encoding; -#ifdef ZEND_MULTIBYTE - enum mbfl_no_encoding *script_encoding_list; - int script_encoding_list_size; -#endif /* ZEND_MULTIBYTE */ - enum mbfl_no_encoding http_output_encoding; - enum mbfl_no_encoding current_http_output_encoding; - enum mbfl_no_encoding http_input_identify; - enum mbfl_no_encoding http_input_identify_get; - enum mbfl_no_encoding http_input_identify_post; - enum mbfl_no_encoding http_input_identify_cookie; - enum mbfl_no_encoding http_input_identify_string; - enum mbfl_no_encoding *http_input_list; - int http_input_list_size; - enum mbfl_no_encoding *detect_order_list; - int detect_order_list_size; - enum mbfl_no_encoding *current_detect_order_list; - int current_detect_order_list_size; + const mbfl_encoding *internal_encoding; + const mbfl_encoding *current_internal_encoding; + const mbfl_encoding *http_output_encoding; + const mbfl_encoding *current_http_output_encoding; + const mbfl_encoding *http_input_identify; + const mbfl_encoding *http_input_identify_get; + const mbfl_encoding *http_input_identify_post; + const mbfl_encoding *http_input_identify_cookie; + const mbfl_encoding *http_input_identify_string; + const mbfl_encoding **http_input_list; + size_t http_input_list_size; + const mbfl_encoding **detect_order_list; + size_t detect_order_list_size; + const mbfl_encoding **current_detect_order_list; + size_t current_detect_order_list_size; enum mbfl_no_encoding *default_detect_order_list; - int default_detect_order_list_size; + size_t default_detect_order_list_size; int filter_illegal_mode; int filter_illegal_substchar; int current_filter_illegal_mode; diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 4fdf222074..863eebead3 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -372,7 +372,7 @@ static OnigEncoding _php_mb_regex_name2mbctype(const char *pname) const char *p; php_mb_regex_enc_name_map_t *mapping; - if (pname == NULL) { + if (pname == NULL || !*pname) { return ONIG_ENCODING_UNDEF; } @@ -784,7 +784,7 @@ PHP_FUNCTION(mb_eregi) /* }}} */ /* {{{ _php_mb_regex_ereg_replace_exec */ -static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOptionType options) +static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOptionType options, int is_callable) { zval **arg_pattern_zval; @@ -794,6 +794,9 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp char *replace; int replace_len; + zend_fcall_info arg_replace_fci; + zend_fcall_info_cache arg_replace_fci_cache; + char *string; int string_len; @@ -826,12 +829,22 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp char *option_str = NULL; int option_str_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zss|s", - &arg_pattern_zval, - &replace, &replace_len, - &string, &string_len, - &option_str, &option_str_len) == FAILURE) { - RETURN_FALSE; + if (!is_callable) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zss|s", + &arg_pattern_zval, + &replace, &replace_len, + &string, &string_len, + &option_str, &option_str_len) == FAILURE) { + RETURN_FALSE; + } + } else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zfs|s", + &arg_pattern_zval, + &arg_replace_fci, &arg_replace_fci_cache, + &string, &string_len, + &option_str, &option_str_len) == FAILURE) { + RETURN_FALSE; + } } if (option_str != NULL) { @@ -859,7 +872,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp RETURN_FALSE; } - if (eval) { + if (eval || is_callable) { pbuf = &eval_buf; description = zend_make_compiled_string_description("mbregex replace" TSRMLS_CC); } else { @@ -867,6 +880,13 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp description = NULL; } + if (is_callable) { + if (eval) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Option 'e' cannot be used with replacement callback"); + RETURN_FALSE; + } + } + /* do the actual work */ err = 0; pos = (OnigUChar *)string; @@ -889,28 +909,32 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp #endif /* copy the part of the string before the match */ smart_str_appendl(&out_buf, pos, (size_t)((OnigUChar *)(string + regs->beg[0]) - pos)); - /* copy replacement and backrefs */ - i = 0; - p = replace; - while (i < replace_len) { - int fwd = (int) php_mb_mbchar_bytes_ex(p, enc); - n = -1; - if ((replace_len - i) >= 2 && fwd == 1 && + + if (!is_callable) { + /* copy replacement and backrefs */ + i = 0; + p = replace; + while (i < replace_len) { + int fwd = (int) php_mb_mbchar_bytes_ex(p, enc); + n = -1; + if ((replace_len - i) >= 2 && fwd == 1 && p[0] == '\\' && p[1] >= '0' && p[1] <= '9') { - n = p[1] - '0'; - } - if (n >= 0 && n < regs->num_regs) { - if (regs->beg[n] >= 0 && regs->beg[n] < regs->end[n] && regs->end[n] <= string_len) { - smart_str_appendl(pbuf, string + regs->beg[n], regs->end[n] - regs->beg[n]); + n = p[1] - '0'; + } + if (n >= 0 && n < regs->num_regs) { + if (regs->beg[n] >= 0 && regs->beg[n] < regs->end[n] && regs->end[n] <= string_len) { + smart_str_appendl(pbuf, string + regs->beg[n], regs->end[n] - regs->beg[n]); + } + p += 2; + i += 2; + } else { + smart_str_appendl(pbuf, p, fwd); + p += fwd; + i += fwd; } - p += 2; - i += 2; - } else { - smart_str_appendl(pbuf, p, fwd); - p += fwd; - i += fwd; } } + if (eval) { zval v; /* null terminate buffer */ @@ -928,7 +952,40 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp /* Clean up */ eval_buf.len = 0; zval_dtor(&v); + } else if (is_callable) { + zval *retval_ptr; + zval **args[1]; + zval *subpats; + int i; + + MAKE_STD_ZVAL(subpats); + array_init(subpats); + + for (i = 0; i < regs->num_regs; i++) { + add_next_index_stringl(subpats, string + regs->beg[i], regs->end[i] - regs->beg[i], 1); + } + + args[0] = &subpats; + /* null terminate buffer */ + smart_str_0(&eval_buf); + + arg_replace_fci.param_count = 1; + arg_replace_fci.params = args; + arg_replace_fci.retval_ptr_ptr = &retval_ptr; + if (zend_call_function(&arg_replace_fci, &arg_replace_fci_cache TSRMLS_CC) == SUCCESS && arg_replace_fci.retval_ptr_ptr) { + convert_to_string_ex(&retval_ptr); + smart_str_appendl(&out_buf, Z_STRVAL_P(retval_ptr), Z_STRLEN_P(retval_ptr)); + eval_buf.len = 0; + zval_ptr_dtor(&retval_ptr); + } else { + efree(description); + if (!EG(exception)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call custom replacement function"); + } + } + zval_ptr_dtor(&subpats); } + n = regs->end[0]; if ((pos - (OnigUChar *)string) < n) { pos = (OnigUChar *)string + n; @@ -969,7 +1026,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp Replace regular expression for multibyte string */ PHP_FUNCTION(mb_ereg_replace) { - _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); + _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); } /* }}} */ @@ -977,7 +1034,15 @@ PHP_FUNCTION(mb_ereg_replace) Case insensitive replace regular expression for multibyte string */ PHP_FUNCTION(mb_eregi_replace) { - _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, ONIG_OPTION_IGNORECASE); + _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, ONIG_OPTION_IGNORECASE, 0); +} +/* }}} */ + +/* {{{ proto string mb_ereg_replace_callback(string pattern, string callback, string string [, string option]) + regular expression for multibyte string using replacement callback */ +PHP_FUNCTION(mb_ereg_replace_callback) +{ + _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); } /* }}} */ diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h index 823b530037..2464c1b1c8 100644 --- a/ext/mbstring/php_mbregex.h +++ b/ext/mbstring/php_mbregex.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -34,6 +34,7 @@ PHP_FE(mb_eregi, arginfo_mb_eregi) \ PHP_FE(mb_ereg_replace, arginfo_mb_ereg_replace) \ PHP_FE(mb_eregi_replace, arginfo_mb_eregi_replace) \ + PHP_FE(mb_ereg_replace_callback, arginfo_mb_ereg_replace_callback) \ PHP_FE(mb_split, arginfo_mb_split) \ PHP_FE(mb_ereg_match, arginfo_mb_ereg_match) \ PHP_FE(mb_ereg_search, arginfo_mb_ereg_search) \ @@ -81,6 +82,7 @@ PHP_FUNCTION(mb_ereg); PHP_FUNCTION(mb_eregi); PHP_FUNCTION(mb_ereg_replace); PHP_FUNCTION(mb_eregi_replace); +PHP_FUNCTION(mb_ereg_replace_callback); PHP_FUNCTION(mb_split); PHP_FUNCTION(mb_ereg_match); PHP_FUNCTION(mb_ereg_search); diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index 9380045e6f..99430d1aaa 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h index b1e395cac1..015073afdf 100644 --- a/ext/mbstring/php_unicode.h +++ b/ext/mbstring/php_unicode.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/tests/bug20087.phpt b/ext/mbstring/tests/bug20087.phpt index d2530fa22e..01bcc90388 100644 --- a/ext/mbstring/tests/bug20087.phpt +++ b/ext/mbstring/tests/bug20087.phpt @@ -2,6 +2,8 @@ Bug #20087 (Assertion failure) --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FAIL-- +register_globals calls killed the ability for mb_parse_str() to register into the global scope --FILE-- <?php ini_set('include_path', dirname(__FILE__)); diff --git a/ext/mbstring/tests/bug28220.phpt b/ext/mbstring/tests/bug28220.phpt index f195606a15..527fdc6fe3 100644 --- a/ext/mbstring/tests/bug28220.phpt +++ b/ext/mbstring/tests/bug28220.phpt @@ -21,5 +21,5 @@ foreach ($coderange as $r) { } ?> --EXPECT-- -8101 +8085 63 diff --git a/ext/mbstring/tests/bug40685.phpt b/ext/mbstring/tests/bug40685.phpt index 420b916bc5..1a673e5d15 100644 --- a/ext/mbstring/tests/bug40685.phpt +++ b/ext/mbstring/tests/bug40685.phpt @@ -8,13 +8,18 @@ $map = array(0, 0x10FFFF, 0, 0xFFFFFF); var_dump(mb_decode_numericentity('&', $map, 'UTF-8')); var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8')); var_dump(mb_decode_numericentity('&#', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('&#x', $map, 'UTF-8')); var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); ?> --EXPECTF-- string(1) "&" string(3) "&&&" string(2) "&#" +string(3) "&#x" string(4) "=" +string(5) "=" +string(1) "=" string(1) "=" - diff --git a/ext/mbstring/tests/bug43301.phpt b/ext/mbstring/tests/bug43301.phpt index 310426a142..2a5f748c5b 100644 --- a/ext/mbstring/tests/bug43301.phpt +++ b/ext/mbstring/tests/bug43301.phpt @@ -15,7 +15,7 @@ echo mb_ereg_replace($ptr,'$1',$txt,'e'); ?> --EXPECTF-- -Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in %sbug43301.php(%d) : mbregex replace on line 1 +Parse error: syntax error, unexpected %s, expecting %s or '$' in %sbug43301.php(%d) : mbregex replace on line %d Fatal error: mb_ereg_replace(): Failed evaluating code: $1 in %sbug43301.php on line %d diff --git a/ext/mbstring/tests/bug49536.phpt b/ext/mbstring/tests/bug49536.phpt index 32685d2267..40328f79f0 100644 --- a/ext/mbstring/tests/bug49536.phpt +++ b/ext/mbstring/tests/bug49536.phpt @@ -16,5 +16,5 @@ var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true)); --EXPECT-- string(4) "SJIS" bool(false) -string(5) "UTF-8" +bool(false) bool(false) diff --git a/ext/mbstring/tests/bug60306.phpt b/ext/mbstring/tests/bug60306.phpt new file mode 100644 index 0000000000..f7969e1952 --- /dev/null +++ b/ext/mbstring/tests/bug60306.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #60306 (Characters lost while converting from cp936 to utf8) +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php +$s = "洪仁玕"; +var_dump($s === mb_convert_encoding(mb_convert_encoding($s, "cp936", "utf8"), "utf8", "cp936")); +?> +--EXPECT-- +bool(true) diff --git a/ext/mbstring/tests/htmlent.phpt b/ext/mbstring/tests/htmlent.phpt index 33c3a5be52..5af96c7c41 100644 --- a/ext/mbstring/tests/htmlent.phpt +++ b/ext/mbstring/tests/htmlent.phpt @@ -15,6 +15,7 @@ mbstring.http_input=HTML-ENTITIES mbstring.internal_encoding=UTF-8 mbstring.http_output=HTML-ENTITIES mbstring.encoding_translation=1 +filter.default=unsafe_raw --FILE-- <?php // enable output encoding through output handler diff --git a/ext/mbstring/tests/illformed_utf_sequences.phpt b/ext/mbstring/tests/illformed_utf_sequences.phpt index a462cd0745..b5b9d94db8 100644 --- a/ext/mbstring/tests/illformed_utf_sequences.phpt +++ b/ext/mbstring/tests/illformed_utf_sequences.phpt @@ -4,145 +4,214 @@ Unicode standard conformance test (ill-formed UTF sequences.) <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> --FILE-- <?php +function chk_enc($str, $n, $enc = "UTF-8", $with_bom = false) { + $src = bin2hex(mb_convert_encoding($str, "UCS-4BE", $enc)); + $dst = str_repeat("0000fffd", $n); + if ($with_bom) { + $dst = "0000feff" . $dst; + } + if ($dst == $src) { + return false; + } else { + return $src; + } +} + +mb_substitute_character(0xfffd); + + echo "UTF-8 redundancy\n"; -var_dump(bin2hex(mb_convert_encoding("\x31\x32\x33", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\x41\x42\x43", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xc0\xb1\xc0\xb2\xc0\xb3", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xc1\x81\xc1\x82\xc1\x83", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xe0\x80\xb1\xe0\x80\xb2\xe0\x80\xb3", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xe0\x81\x81\xe0\x81\x82\xe0\x81\x83", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf0\x80\x80\xb1\xf0\x80\x80\xb2\xf0\x80\x80\xb3", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf0\x80\x81\x81\xf0\x80\x81\x82\xf0\x81\x83", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf8\x80\x80\x80\xb1\xf8\x80\x80\x80\xb2\xf8\x80\x80\x80\xb3", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf8\x80\x80\x81\x81\xf8\x80\x80\x81\x82\xf8\x80\x80\x81\x83", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfc\x80\x80\x80\x80\xb1\xfc\x80\x80\x80\x80\xb2\xfc\x80\x80\x80\x80\xb3", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfc\x80\x80\x80\x81\x81\xfc\x80\x80\x80\x81\x82\xfc\x80\x80\x80\x81\x83", "UCS-4BE", "UTF-8"))); +var_dump(chk_enc("\x31\x32\x33", 0)); +var_dump(chk_enc("\x41\x42\x43", 0)); +var_dump(chk_enc("\xc0\xb1\xc0\xb2\xc0\xb3", 6)); +var_dump(chk_enc("\xc1\x81\xc1\x82\xc1\x83", 6)); +var_dump(chk_enc("\xe0\x80\xb1\xe0\x80\xb2\xe0\x80\xb3", 6)); +var_dump(chk_enc("\xe0\x81\x81\xe0\x81\x82\xe0\x81\x83", 6)); +var_dump(chk_enc("\xf0\x80\x80\xb1\xf0\x80\x80\xb2\xf0\x80\x80\xb3", 9)); +var_dump(chk_enc("\xf0\x80\x81\x81\xf0\x80\x81\x82\xf0\x81\x83", 8)); +var_dump(chk_enc("\xf8\x80\x80\x80\xb1\xf8\x80\x80\x80\xb2\xf8\x80\x80\x80\xb3", 15)); +var_dump(chk_enc("\xf8\x80\x80\x81\x81\xf8\x80\x80\x81\x82\xf8\x80\x80\x81\x83", 15)); +var_dump(chk_enc("\xfc\x80\x80\x80\x80\xb1\xfc\x80\x80\x80\x80\xb2\xfc\x80\x80\x80\x80\xb3", 18)); +var_dump(chk_enc("\xfc\x80\x80\x80\x81\x81\xfc\x80\x80\x80\x81\x82\xfc\x80\x80\x80\x81\x83", 18)); -var_dump(bin2hex(mb_convert_encoding("\xc2\xa2\xc2\xa3\xc2\xa5", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xe0\x82\xa2\xe0\x82\xa3\xe0\x82\xa5", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf0\x80\x82\xa2\xf0\x80\x82\xa3\xf0\x80\x82\xa5", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf8\x80\x80\x82\xa2\xf8\x80\x80\x82\xa3\xf8\x80\x80\x82\xa5", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfc\x80\x80\x80\x82\xa2\xfc\x80\x80\x80\x82\xa3\xfc\x80\x80\x80\x82\xa5", "UCS-4BE", "UTF-8"))); +var_dump(chk_enc("\xc2\xa2\xc2\xa3\xc2\xa5", 0)); +var_dump(chk_enc("\xe0\x82\xa2\xe0\x82\xa3\xe0\x82\xa5", 6)); +var_dump(chk_enc("\xf0\x80\x82\xa2\xf0\x80\x82\xa3\xf0\x80\x82\xa5", 9)); +var_dump(chk_enc("\xf8\x80\x80\x82\xa2\xf8\x80\x80\x82\xa3\xf8\x80\x80\x82\xa5", 15)); +var_dump(chk_enc("\xfc\x80\x80\x80\x82\xa2\xfc\x80\x80\x80\x82\xa3\xfc\x80\x80\x80\x82\xa5", 18)); -var_dump(bin2hex(mb_convert_encoding("\xc1\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xc2\x80", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xdf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xe0\x9f\xff", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xe0\xa0\x80", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xef\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf0\x8f\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf0\x90\x80\x80", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf7\xbf\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf8\x87\xbf\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xf8\x88\x80\x80\x80", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfb\xbf\xbf\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfc\x83\xbf\xbf\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfc\x84\x80\x80\x80\x80", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfd\xaf\xbf\xbf\xbf\xbf", "UCS-4BE", "UTF-8"))); -var_dump(bin2hex(mb_convert_encoding("\xfd\xbf\xbf\xbf\xbf\xbf", "UCS-4BE", "UTF-8"))); +var_dump(chk_enc("\xc1\xbf", 2)); +var_dump(chk_enc("\xc2\x80", 0)); +var_dump(chk_enc("\xdf\xbf", 0)); +var_dump(chk_enc("\xe0\x9f\xff", 2)); +var_dump(chk_enc("\xe0\xa0\x80", 2)); +var_dump(chk_enc("\xef\xbf\xbf", 0)); +var_dump(chk_enc("\xf0\x8f\xbf\xbf", 3)); +var_dump(chk_enc("\xf0\x90\x80\x80", 0)); +var_dump(chk_enc("\xf7\xbf\xbf\xbf", 4)); +var_dump(chk_enc("\xf8\x87\xbf\xbf\xbf", 5)); +var_dump(chk_enc("\xf8\x88\x80\x80\x80", 5)); +var_dump(chk_enc("\xfb\xbf\xbf\xbf\xbf", 5)); +var_dump(chk_enc("\xfc\x83\xbf\xbf\xbf\xbf", 6)); +var_dump(chk_enc("\xfc\x84\x80\x80\x80\x80", 6)); +var_dump(chk_enc("\xfd\xaf\xbf\xbf\xbf\xbf", 6)); +var_dump(chk_enc("\xfd\xbf\xbf\xbf\xbf\xbf", 6)); echo "UTF-8 and surrogates area\n"; $out = ''; +$cnt = 0; for ($i = 0xd7ff; $i <= 0xe000; ++$i) { - $out .= mb_convert_encoding(pack('C3', 0xe0 | ($i >> 12), 0x80 | ($i >> 6) & 0x3f, 0x80 | $i & 0x3f), "UCS-4BE", "UTF-8"); + $s = chk_enc(pack('C3', 0xe0 | ($i >> 12), 0x80 | ($i >> 6) & 0x3f, 0x80 | $i & 0x3f), 2); + if ($s === false) { + $cnt++; + } else { + $out .= $s; + } } -var_dump(bin2hex($out)); +var_dump($cnt); +var_dump($out); echo "UTF-32 code range\n"; -var_dump(bin2hex(mb_convert_encoding("\x00\x11\x00\x00", "UCS-4BE", "UTF-32BE"))); -var_dump(bin2hex(mb_convert_encoding("\x00\x10\xff\xff", "UCS-4BE", "UTF-32BE"))); -var_dump(bin2hex(mb_convert_encoding("\x00\x00\x11\x00", "UCS-4BE", "UTF-32LE"))); -var_dump(bin2hex(mb_convert_encoding("\xff\xff\x10\x00", "UCS-4BE", "UTF-32LE"))); -var_dump(bin2hex(mb_convert_encoding("\x00\x11\x00\x00", "UCS-4BE", "UTF-32"))); -var_dump(bin2hex(mb_convert_encoding("\x00\x10\xff\xff", "UCS-4BE", "UTF-32"))); -var_dump(bin2hex(mb_convert_encoding("\x00\x00\xfe\xff\x00\x11\x00\x00", "UCS-4BE", "UTF-32"))); -var_dump(bin2hex(mb_convert_encoding("\x00\x00\xfe\xff\x00\x10\xff\xff", "UCS-4BE", "UTF-32"))); -var_dump(bin2hex(mb_convert_encoding("\xff\xfe\x00\x00\x00\x00\x11\x00", "UCS-4BE", "UTF-32"))); -var_dump(bin2hex(mb_convert_encoding("\xff\xfe\x00\x00\xff\xff\x10\x00", "UCS-4BE", "UTF-32"))); +var_dump(chk_enc("\x00\x11\x00\x00", 1, "UTF-32BE")); +var_dump(chk_enc("\x00\x10\xff\xff", 0, "UTF-32BE")); +var_dump(chk_enc("\x00\x00\x11\x00", 1, "UTF-32LE")); +var_dump(chk_enc("\xff\xff\x10\x00", 0, "UTF-32LE")); +var_dump(chk_enc("\x00\x11\x00\x00", 1, "UTF-32")); +var_dump(chk_enc("\x00\x10\xff\xff", 0, "UTF-32")); +var_dump(chk_enc("\x00\x00\xfe\xff\x00\x11\x00\x00", 0, "UTF-32")); +var_dump(chk_enc("\x00\x00\xfe\xff\x00\x10\xff\xff", 0, "UTF-32")); +var_dump(chk_enc("\xff\xfe\x00\x00\x00\x00\x11\x00", 0, "UTF-32")); +var_dump(chk_enc("\xff\xfe\x00\x00\xff\xff\x10\x00", 0, "UTF-32")); echo "UTF-32 and surrogates area\n"; $out = ''; +$cnt = 0; for ($i = 0xd7ff; $i <= 0xe000; ++$i) { - $out .= mb_convert_encoding(pack('C4', $i >> 24, ($i >> 16) & 0xff, ($i >> 8) & 0xff, $i & 0xff), "UCS-4BE", "UTF-32BE"); + $s = chk_enc(pack('C4', $i >> 24, ($i >> 16) & 0xff, ($i >> 8) & 0xff, $i & 0xff), 1, "UTF-32BE"); + if ($s === false) { + $cnt++; + } else { + $out .= $s; + } } -var_dump(bin2hex($out)); +var_dump($cnt); +var_dump($out); $out = ''; +$cnt = 0; for ($i = 0xd7ff; $i <= 0xe000; ++$i) { - $out .= mb_convert_encoding(pack('C4', $i & 0xff, ($i >> 8) & 0xff, ($i >> 16) & 0xff, ($i >> 24) & 0xff), "UCS-4BE", "UTF-32LE"); + $s = chk_enc(pack('C4', $i & 0xff, ($i >> 8) & 0xff, ($i >> 16) & 0xff, ($i >> 24) & 0xff), 1, "UTF-32LE"); + if ($s === false) { + $cnt++; + } else { + $out .= $s; + } } -var_dump(bin2hex($out)); +var_dump($cnt); +var_dump($out); $out = ''; +$cnt = 0; for ($i = 0xd7ff; $i <= 0xe000; ++$i) { - $out .= mb_convert_encoding(pack('C4', $i >> 24, ($i >> 16) & 0xff, ($i >> 8) & 0xff, $i & 0xff), "UCS-4BE", "UTF-32"); + $s = chk_enc(pack('C4', $i >> 24, ($i >> 16) & 0xff, ($i >> 8) & 0xff, $i & 0xff), 1, "UTF-32"); + if ($s === false) { + $cnt++; + } else { + $out .= $s; + } } -var_dump(bin2hex($out)); +var_dump($cnt); +var_dump($out); + +echo "UTF-32 and surrogates area with BOM\n"; $out = ''; +$cnt = 0; for ($i = 0xd7ff; $i <= 0xe000; ++$i) { - $out .= mb_convert_encoding("\x00\x00\xfe\xff". pack('C4', $i >> 24, ($i >> 16) & 0xff, ($i >> 8) & 0xff, $i & 0xff), "UCS-4BE", "UTF-32"); + $s = chk_enc("\x00\x00\xfe\xff". pack('C4', $i >> 24, ($i >> 16) & 0xff, ($i >> 8) & 0xff, $i & 0xff), + 1, "UTF-32", true); + if ($s === false) { + $cnt++; + } else { + $out .= $s; + } } -var_dump(bin2hex(str_replace("\x00\x00\xfe\xff", "", $out))); - +var_dump($cnt); +var_dump(str_replace("0000feff","",$out)); $out = ''; +$cnt = 0; for ($i = 0xd7ff; $i <= 0xe000; ++$i) { - $out .= mb_convert_encoding("\xff\xfe\x00\x00". pack('C4', $i & 0xff, ($i >> 8) & 0xff, ($i >> 16) & 0xff, ($i >> 24) & 0xff), "UCS-4BE", "UTF-32"); + $s = chk_enc("\xff\xfe\x00\x00". pack('C4', $i & 0xff, ($i >> 8) & 0xff, ($i >> 16) & 0xff, ($i >> 24) & 0xff), + 1, "UTF-32", true); + if ($s === false) { + $cnt++; + } else { + $out .= $s; + } } -var_dump(bin2hex(str_replace("\x00\x00\xfe\xff", "", $out))); +var_dump($cnt); +var_dump(str_replace("0000feff","",$out)); + ?> --EXPECT-- UTF-8 redundancy string(24) "000000310000003200000033" string(24) "000000410000004200000043" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) string(24) "000000a2000000a3000000a5" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) string(8) "00000080" string(8) "000007ff" -string(0) "" +bool(false) string(8) "00000800" string(8) "0000ffff" -string(0) "" +bool(false) string(8) "00010000" -string(8) "001fffff" -string(0) "" -string(8) "00200000" -string(8) "03ffffff" -string(0) "" -string(8) "04000000" -string(8) "6fffffff" -string(0) "" +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) UTF-8 and surrogates area +int(2048) string(16) "0000d7ff0000e000" UTF-32 code range -string(0) "" +bool(false) string(8) "0010ffff" -string(0) "" +bool(false) string(8) "0010ffff" -string(0) "" +bool(false) string(8) "0010ffff" -string(8) "0000feff" +string(16) "0000feff0000fffd" string(16) "0000feff0010ffff" -string(8) "0000feff" +string(16) "0000feff0000fffd" string(16) "0000feff0010ffff" UTF-32 and surrogates area +int(2048) string(16) "0000d7ff0000e000" +int(2048) string(16) "0000d7ff0000e000" +int(2048) string(16) "0000d7ff0000e000" +UTF-32 and surrogates area with BOM +int(2048) string(16) "0000d7ff0000e000" +int(2048) string(16) "0000d7ff0000e000" diff --git a/ext/mbstring/tests/mb_encoding_aliases.phpt b/ext/mbstring/tests/mb_encoding_aliases.phpt index 2159481efe..8ef299425a 100644 --- a/ext/mbstring/tests/mb_encoding_aliases.phpt +++ b/ext/mbstring/tests/mb_encoding_aliases.phpt @@ -13,26 +13,28 @@ var_dump(mb_encoding_aliases("8bit")); ?> --EXPECTF-- Warning: mb_encoding_aliases() expects exactly 1 parameter, 0 given in %s on line 2 -array(10) { +array(11) { [0]=> string(14) "ANSI_X3.4-1968" [1]=> string(14) "ANSI_X3.4-1986" [2]=> - string(6) "IBM367" + string(7) "IBM-367" [3]=> - string(9) "ISO646-US" + string(6) "IBM367" [4]=> - string(16) "ISO_646.irv:1991" + string(9) "ISO646-US" [5]=> - string(8) "US-ASCII" + string(16) "ISO_646.irv:1991" [6]=> - string(5) "cp367" + string(8) "US-ASCII" [7]=> - string(7) "csASCII" + string(5) "cp367" [8]=> - string(8) "iso-ir-6" + string(7) "csASCII" [9]=> + string(8) "iso-ir-6" + [10]=> string(2) "us" } array(0) { diff --git a/ext/mbstring/tests/mb_ereg_replace_callback.phpt b/ext/mbstring/tests/mb_ereg_replace_callback.phpt new file mode 100644 index 0000000000..98a3809574 --- /dev/null +++ b/ext/mbstring/tests/mb_ereg_replace_callback.phpt @@ -0,0 +1,15 @@ +--TEST-- +mb_ereg_replace_callback() +--SKIPIF-- +<?php +extension_loaded('mbstring') or die('skip mbstring not available'); +function_exists('mb_ereg_replace_callback') or die("skip mb_ereg_replace_callback() is not available in this build"); +?> +--FILE-- +<?php +$str = 'abc 123 #",; $foo'; +echo mb_ereg_replace_callback('(\S+)', function($m){return $m[1].'('.strlen($m[1]).')';}, $str); +?> +--EXPECT-- +abc(3) 123(3) #",;(4) $foo(4) + diff --git a/ext/mbstring/tests/mb_internal_encoding_variation2.phpt b/ext/mbstring/tests/mb_internal_encoding_variation2.phpt index 3d2c547313..914041c914 100644 --- a/ext/mbstring/tests/mb_internal_encoding_variation2.phpt +++ b/ext/mbstring/tests/mb_internal_encoding_variation2.phpt @@ -330,10 +330,10 @@ string(6) "EUC-TW" -- Iteration 48 -- string(6) "EUC-TW" bool(true) -string(5) "BIG-5" +string(5) "CP950" -- Iteration 49 -- -string(5) "BIG-5" +string(5) "CP950" bool(true) string(5) "BIG-5" diff --git a/ext/mbstring/tests/mb_parse_str.phpt b/ext/mbstring/tests/mb_parse_str.phpt index 8b320b0845..59d187bd05 100644 --- a/ext/mbstring/tests/mb_parse_str.phpt +++ b/ext/mbstring/tests/mb_parse_str.phpt @@ -2,9 +2,10 @@ mb_parse_str() --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FAIL-- +register_globals calls killed the ability for mb_parse_str() to register into the global scope --INI-- arg_separator.input=& -register_globals=0 --FILE-- <?php $queries = array( diff --git a/ext/mbstring/tests/mb_parse_str02.phpt b/ext/mbstring/tests/mb_parse_str02.phpt index 51cfb63cb9..f35699928e 100644 --- a/ext/mbstring/tests/mb_parse_str02.phpt +++ b/ext/mbstring/tests/mb_parse_str02.phpt @@ -2,9 +2,10 @@ mb_parse_str() test 2 --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FAIL-- +register_globals calls killed the ability for mb_parse_str() to register into the global scope --INI-- arg_separator.input=&# -register_globals=0 --FILE-- <?php $queries = array( diff --git a/ext/mbstring/tests/mb_str_functions_opt-parameter.phpt b/ext/mbstring/tests/mb_str_functions_opt-parameter.phpt new file mode 100644 index 0000000000..5fb642f9b2 --- /dev/null +++ b/ext/mbstring/tests/mb_str_functions_opt-parameter.phpt @@ -0,0 +1,30 @@ +--TEST-- +Optional long parameter might be null +--FILE-- +<?php +echo mb_strpos('abb', 'b', null, 'UTF-8') . "\n"; +echo mb_strrpos('abb', 'b', null, 'UTF-8') . "\n"; +echo mb_stripos('abb', 'B', null, 'UTF-8') . "\n"; +echo mb_strripos('abb', 'B', null, 'UTF-8') . "\n"; +echo mb_strstr('foobarbaz', 'ba', null, 'UTF-8') . "\n"; +echo mb_strrchr('foobarbaz', 'ba', null, 'UTF-8') . "\n"; +echo mb_stristr('foobarbaz', 'BA', null, 'UTF-8') . "\n"; +echo mb_strrichr('foobarbaz', 'BA', null, 'UTF-8') . "\n"; +echo mb_substr('foobarbaz', 6, null, 'UTF-8') . "\n"; +echo mb_strcut('foobarbaz', 6, null, 'UTF-8') . "\n"; +echo mb_strimwidth('foobar', 0, 3, null, 'UTF-8') . "\n"; +?> +==DONE== +--EXPECT-- +1 +2 +1 +2 +barbaz +baz +barbaz +baz +baz +baz +foo +==DONE== diff --git a/ext/mbstring/tests/pictogram1.phpt b/ext/mbstring/tests/pictogram1.phpt new file mode 100644 index 0000000000..2c9609939a --- /dev/null +++ b/ext/mbstring/tests/pictogram1.phpt @@ -0,0 +1,172 @@ +--TEST-- +Emoji (Pictogram characters for cellular phone in Japan) test based on Unicode 6.0 +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php +mb_substitute_character(0x3f); + +echo "SJIS-Mobile to Unicode\n"; +var_dump(bin2hex(mb_convert_encoding("\xf8\x9f", "UCS-4BE", "SJIS-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xf6\x60", "UCS-4BE", "SJIS-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xf9\x8b", "UCS-4BE", "SJIS-Mobile#SOFTBANK"))); + +var_dump(bin2hex(mb_convert_encoding("\xf9\xe6", "UCS-4BE", "SJIS-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xf6\xec", "UCS-4BE", "SJIS-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xf7\x50", "UCS-4BE", "SJIS-Mobile#SOFTBANK"))); + +var_dump(bin2hex(mb_convert_encoding("\xf9\x85", "UCS-4BE", "SJIS-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xf4\x89", "UCS-4BE", "SJIS-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xf7\xb0", "UCS-4BE", "SJIS-Mobile#SOFTBANK"))); + +var_dump(bin2hex(mb_convert_encoding("\xf3\xd2", "UCS-4BE", "SJIS-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xfb\xb3", "UCS-4BE", "SJIS-Mobile#SOFTBANK"))); + +echo "Unicode to SJIS-Mobile\n"; +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "SJIS-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "SJIS-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "SJIS-Mobile#SOFTBANK", "UCS-4BE"))); + +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf3\x40", "SJIS-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf3\x40", "SJIS-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf3\x40", "SJIS-Mobile#SOFTBANK", "UCS-4BE"))); + +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x00\x23\x00\x00\x20\xe3", "SJIS-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x00\x23\x00\x00\x20\xe3", "SJIS-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x00\x23\x00\x00\x20\xe3", "SJIS-Mobile#SOFTBANK", "UCS-4BE"))); + +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf1\xe8\x00\x01\xf1\xf3", "SJIS-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf1\xe8\x00\x01\xf1\xf3", "SJIS-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf1\xe8\x00\x01\xf1\xf3", "SJIS-Mobile#SOFTBANK", "UCS-4BE"))); + +echo "UTF-8-Mobile to Unicode\n"; +var_dump(bin2hex(mb_convert_encoding("\xee\x98\xbe", "UCS-4BE", "UTF-8-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xee\xbd\xa0", "UCS-4BE", "UTF-8-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xee\x81\x8a", "UCS-4BE", "UTF-8-Mobile#SOFTBANK"))); + +var_dump(bin2hex(mb_convert_encoding("\xee\x9d\x81", "UCS-4BE", "UTF-8-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xee\xbf\xac", "UCS-4BE", "UTF-8-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xee\x84\x90", "UCS-4BE", "UTF-8-Mobile#SOFTBANK"))); + +var_dump(bin2hex(mb_convert_encoding("\xee\x9b\xa0", "UCS-4BE", "UTF-8-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xee\xb6\x89", "UCS-4BE", "UTF-8-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xee\x88\x90", "UCS-4BE", "UTF-8-Mobile#SOFTBANK"))); + +var_dump(bin2hex(mb_convert_encoding("\xee\xb3\x92", "UCS-4BE", "UTF-8-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xee\x94\x93", "UCS-4BE", "UTF-8-Mobile#SOFTBANK"))); + +echo "Unicode to UTF8-Mobile\n"; +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "UTF-8-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "UTF-8-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "UTF-8-Mobile#SOFTBANK", "UCS-4BE"))); + +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf3\x40", "UTF-8-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf3\x40", "UTF-8-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf3\x40", "UTF-8-Mobile#SOFTBANK", "UCS-4BE"))); + +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x00\x23\x00\x00\x20\xe3", "UTF-8-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x00\x23\x00\x00\x20\xe3", "UTF-8-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x00\x23\x00\x00\x20\xe3", "UTF-8-Mobile#SOFTBANK", "UCS-4BE"))); + +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf1\xe8\x00\x01\xf1\xf3", "UTF-8-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf1\xe8\x00\x01\xf1\xf3", "UTF-8-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x01\xf1\xe8\x00\x01\xf1\xf3", "UTF-8-Mobile#SOFTBANK", "UCS-4BE"))); + +echo "Unicode to ISO-2022-JP-MOBILE#KDDI\n"; +var_dump(bin2hex(mb_convert_encoding("\x00\x00\x26\x00", "ISO-2022-JP-MOBILE#KDDI", "UCS-4BE"))); + +echo "ISO-2022-JP-MOBILE#KDDI to Unicode\n"; +var_dump(bin2hex(mb_convert_encoding("\x1b\x24\x42\x75\x41\x1b\x28\x42", "UCS-4BE", "ISO-2022-JP-MOBILE#KDDI"))); + +echo "SJIS-Mobile to Unicode (Google) \n"; +var_dump(bin2hex(mb_convert_encoding("\xf9\x86", "UCS-4BE", "SJIS-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xf7\x48", "UCS-4BE", "SJIS-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xfb\xd8", "UCS-4BE", "SJIS-Mobile#SOFTBANK"))); + +echo "Unicode (Google) to SJIS-Mobile\n"; +var_dump(bin2hex(mb_convert_encoding("\x00\x0f\xe8\x2d", "SJIS-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x0f\xe8\x2d", "SJIS-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x0f\xee\x70", "SJIS-Mobile#SOFTBANK", "UCS-4BE"))); + +echo "UTF-8-Mobile to Unicode (Google) \n"; +var_dump(bin2hex(mb_convert_encoding("\xee\x9b\xa1", "UCS-4BE", "UTF-8-Mobile#DOCOMO"))); +var_dump(bin2hex(mb_convert_encoding("\xef\x81\x88", "UCS-4BE", "UTF-8-Mobile#KDDI"))); +var_dump(bin2hex(mb_convert_encoding("\xee\x94\xb8", "UCS-4BE", "UTF-8-Mobile#SOFTBANK")));// + +echo "Unicode (Google) to UTF-8-Mobile\n"; +var_dump(bin2hex(mb_convert_encoding("\x00\x0f\xe8\x2d", "UTF-8-Mobile#DOCOMO", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x0f\xe8\x2d", "UTF-8-Mobile#KDDI", "UCS-4BE"))); +var_dump(bin2hex(mb_convert_encoding("\x00\x0f\xee\x70", "UTF-8-Mobile#SOFTBANK", "UCS-4BE")));// + +?> +--EXPECT-- +SJIS-Mobile to Unicode +string(8) "00002600" +string(8) "00002600" +string(8) "00002600" +string(8) "0001f340" +string(8) "0001f340" +string(8) "0001f340" +string(16) "00000023000020e3" +string(16) "00000023000020e3" +string(16) "00000023000020e3" +string(16) "0001f1e80001f1f3" +string(16) "0001f1e80001f1f3" +Unicode to SJIS-Mobile +string(4) "f89f" +string(4) "f660" +string(4) "f98b" +string(4) "f9e6" +string(4) "f6ec" +string(4) "f750" +string(4) "f985" +string(4) "f489" +string(4) "f7b0" +string(4) "3f3f" +string(4) "f3d2" +string(4) "fbb3" +UTF-8-Mobile to Unicode +string(8) "00002600" +string(8) "00002600" +string(8) "00002600" +string(8) "0001f340" +string(8) "0001f340" +string(8) "0001f340" +string(16) "00000023000020e3" +string(16) "00000023000020e3" +string(16) "00000023000020e3" +string(16) "0001f1e80001f1f3" +string(16) "0001f1e80001f1f3" +Unicode to UTF8-Mobile +string(6) "ee98be" +string(6) "eebda0" +string(6) "ee818a" +string(6) "ee9d81" +string(6) "eebfac" +string(6) "ee8490" +string(6) "ee9ba0" +string(6) "eeb689" +string(6) "ee8890" +string(16) "f09f87a8f09f87b3" +string(6) "eeb392" +string(6) "ee9493" +Unicode to ISO-2022-JP-MOBILE#KDDI +string(16) "1b244275411b2842" +ISO-2022-JP-MOBILE#KDDI to Unicode +string(8) "00002600" +SJIS-Mobile to Unicode (Google) +string(8) "000fe82d" +string(8) "000fe82d" +string(8) "000fee70" +Unicode (Google) to SJIS-Mobile +string(4) "f986" +string(4) "f748" +string(4) "fbd8" +UTF-8-Mobile to Unicode (Google) +string(8) "000fe82d" +string(8) "000fe82d" +string(8) "000fee70" +Unicode (Google) to UTF-8-Mobile +string(6) "ee9ba1" +string(6) "ef8188" +string(6) "ee94b8" diff --git a/ext/mbstring/tests/zend_multibyte-10.phpt b/ext/mbstring/tests/zend_multibyte-10.phpt index 89c7c1c26c..435c339752 100644 --- a/ext/mbstring/tests/zend_multibyte-10.phpt +++ b/ext/mbstring/tests/zend_multibyte-10.phpt @@ -15,4 +15,3 @@ echo "ok\n"; ?> --EXPECTF-- ok - |
