php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69079 enhancement for mb_substitute_character
Submitted: 2015-02-19 11:44 UTC Modified: 2017-01-04 06:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: masakielastic at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: mbstring related
PHP Version: 5.6.5 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: masakielastic at gmail dot com
New email:
PHP Version: OS:

 

 [2015-02-19 11:44 UTC] masakielastic at gmail dot com
Description:
------------
It is not enough to check the range of argument of mb_substitute_character.
Consider UTF-8. For example, 0x1F600 (GRINNING FACE) is rejected.
0xD800 is accepted despite of high surrogate.

Test script:
---------------
var_dump(
    mb_substitute_character(0x1F600),
    mb_substitute_character(0xD800)
);

Expected result:
----------------
bool(true)
bool(false)

Actual result:
--------------
bool(false)
bool(true)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-27 05:09 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2017-01-04 06:59 UTC] krakjoe@php.net
-Status: Assigned +Status: Closed
 [2017-01-04 06:59 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 12:01:27 2024 UTC