|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47990 mb_check_encoding() accepts surrogates for UTF-8
Submitted: 2009-04-16 15:53 UTC Modified: 2010-02-21 22:24 UTC
Avg. Score:3.3 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: mercator+bugs at gmail dot com Assigned: moriyoshi
Status: Assigned Package: mbstring related
PHP Version: 5.2.9 OS: Windows XP
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-04-16 15:53 UTC] mercator+bugs at gmail dot com
mb_check_encoding() wrongly considers surrogates (Unicode range U+D800 - U+DFFF) to be valid for the UTF-8 encoding.

Reproduce code:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-18 08:53 UTC] deceze at gmail dot com
This seems to be fixed in PHP 5.3, it returns false as expected. Close?
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Fri Jul 28 14:01:46 2017 UTC