Bug #68846 [Opn->Csd]: False detection of CJK Unified Ideographs Extension E
Edit report at https://bugs.php.net/bug.php?id=68846&edit=1
ID: 68846
Updated by: stas@php.net
Reported by: masakielastic at gmail dot com
Summary: False detection of CJK Unified Ideographs Extension
E
-Status: Open
+Status: Closed
Type: Bug
Package: mbstring related
Operating System: Mac OS X
PHP Version: 5.6.4
-Assigned To:
+Assigned To: stas
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2015-02-18 15:26:10] masakielastic at gmail dot com
I created pull request.
https://github.com/php/php-src/pull/1092
------------------------------------------------------------------------
[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)