|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-05 03:54 UTC] cataphract@php.net
[2010-10-05 03:55 UTC] cataphract@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cataphract
[2010-10-05 03:55 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
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