#47990 [Opn->Asn]: mb_check_encoding() accepts surrogates for UTF-8
| From: | moriyoshi@php.net | Date: | Sun, 21 Feb 2010 22:24:03 +0000 |
| Subject: | #47990 [Opn->Asn]: mb_check_encoding() accepts surrogates for UTF-8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-147931@lists.php.net to get a copy of this message | ||
ID: 47990
Updated by: moriyoshi@php.net
Reported By: mercator+bugs at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: mbstring related
Operating System: Windows XP
PHP Version: 5.2.9
-Assigned To:
+Assigned To: moriyoshi
Previous Comments:
------------------------------------------------------------------------
[2009-04-16 15:53:35] mercator+bugs at gmail dot com
Description:
------------
mb_check_encoding() wrongly considers surrogates (Unicode range U+D800
- U+DFFF) to be valid for the UTF-8 encoding.
Reproduce code:
---------------
var_dump(mb_check_encoding("\xed\xa0\x80",'UTF-8'));
Expected result:
----------------
bool(false)
Actual result:
--------------
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47990&edit=1