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

From: Date: Fri, 16 Jan 2015 14:26:58 +0000
Subject: Bug #68846 [NEW]: False detection of CJK Unified Ideographs Extension E
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189989@lists.php.net to get a copy of this message
From:             masakielastic at gmail dot com
Operating system: Mac OS X
PHP version:      5.6.4
Package:          mbstring related
Bug Type:         Bug
Bug description:False detection of CJK Unified Ideographs Extension E

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 bug report at https://bugs.php.net/bug.php?id=68846&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=68846&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=68846&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=68846&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=68846&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=68846&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=68846&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=68846&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=68846&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=68846&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=68846&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=68846&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=68846&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=68846&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68846&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=68846&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=68846&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=68846&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68846&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=68846&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=68846&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#189989) next »