Bug #68846 [Com]: False detection of CJK Unified Ideographs Extension E

From: Date: Wed, 18 Feb 2015 15:26:10 +0000
Subject: Bug #68846 [Com]: False detection of CJK Unified Ideographs Extension E
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190789@lists.php.net to get a copy of this message
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)

« previous php.bugs (#190789) next »