From d938844d8fa070f3b2f53e1b3cbef6790ca50da7 Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Fri, 23 Sep 2011 11:11:38 +0000 Subject: [PATCH] MFH: fixed a bug in convertion table and added test script for emoji. --- .../libmbfl/filters/mbfilter_sjis_mobile.c | 2 +- ext/mbstring/tests/pictogram1.phpt | 172 ++++++++++++++++++ 2 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 ext/mbstring/tests/pictogram1.phpt diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index fee36bcaa0..ecd1e0e782 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -176,7 +176,7 @@ const unsigned short mbfl_sb2uni_pua[6][3] = { {0x2921, 0x297a, 0xe001}, {0x2980, 0x29cc, 0xe301}, {0x2a99, 0x2ae4, 0xe401}, - {0x2af8, 0x2b2e, 0xe501}, + {0x2af8, 0x2b2f, 0xe501}, }; const unsigned short mbfl_kddi2uni_pua_b[8][3] = { 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-- + +--FILE-- + +--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" -- 2.50.1