Bug #68846 [Com]: False detection of CJK Unified Ideographs Extension E
Edit report at https://bugs.php.net/bug.php?id=68846&edit=1
ID: 68846
Comment by: masakielastic at gmail dot com
Reported by: masakielastic at gmail dot com
Summary: False detection of CJK Unified Ideographs Extension
E
Status: Open
Type: Bug
Package: mbstring related
Operating System: Mac OS X
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
I created pull request.
https://github.com/php/php-src/pull/1092
Previous Comments:
------------------------------------------------------------------------
[2015-01-16 14:26:57] masakielastic at gmail dot com
Description:
------------
mb_check_encoding return false if the encoding is GB18030 and the string contains CJK Unified
Ideographs Extension E (U+2B820 .. U+2CEA1) which Unicode Version 8.0 include.
http://d.hatena.ne.jp/NAOI/20130828/1377674904
http://blogs.adobe.com/CCJKType/2015/01/cjk-unified-ideographs-unicode-8.html
http://blogs.adobe.com/CCJKType/files/2015/01/ideographs-unicode-9.pdf
Test script:
---------------
// U+2B864
$str = mb_convert_encoding("\xF0\xAB\xA1\xA4", 'GB18030', 'UTF-8');
var_dump(
mb_check_encoding($str, 'GB18030')
);
Expected result:
----------------
true
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68846&edit=1
Thread (3 messages)