From:
Operating system:
PHP version: 5.3.3
Package: Unicode Engine related
Bug Type: Bug
Bug description:Unicode data used by mbstring need to be updated
Description:
------------
mbstring functions seem to use old Unicode data, so the functions are not
able to cope with new characters introduced to Unicode lately (e.g.
mb_strtoupper ignores lower-case characters because it does not know
them).
AFAICT (and I am no PHP expert, mind you), what is needed to be done is to
update ext/mbstring/unicode_data.h (possibly just regenerating the file, as
it says âIt was generated by a modified version of ucgendat, part of the
ucdata-2.5 packageâ).
Test script:
---------------
function test($str)
{
$upper = mb_strtoupper($str, 'UTF-8');
$len = strlen($upper);
for ($i = 0; $i < $len; ++$i) echo dechex(ord($upper[$i])) . ' ';
echo "\n";
}
// OK
test("\xF0\x90\x90\xB8");// U+10438 DESERET SMALL LETTER H (added in 3.1.0,
March 2001)
// not OK
test("\xE2\xB0\xB0"); // U+2C30 GLAGOLITIC SMALL LETTER AZU (added in
4.1.0, March 2005)
test("\xD4\xA5"); // U+0525 CYRILLIC SMALL LETTER PE WITH
DESCENDER (added
in 5.2.0, October 2009)
Expected result:
----------------
f0 90 90 90
e2 b0 80
d4 a4
Actual result:
--------------
f0 90 90 90
e2 b0 b0
d4 a5
--
Edit bug report at http://bugs.php.net/bug.php?id=52981&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52981&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52981&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52981&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52981&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52981&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52981&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52981&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52981&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52981&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52981&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52981&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52981&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52981&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52981&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52981&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52981&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52981&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52981&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52981&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52981&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52981&r=mysqlcfg