Skip to content

Fix #68447: grapheme_extract take an extra trailing character#1974

Merged
php-pulls merged 1 commit intophp:PHP-5.6from
ranvis:fix-68447
Nov 27, 2016
Merged

Fix #68447: grapheme_extract take an extra trailing character#1974
php-pulls merged 1 commit intophp:PHP-5.6from
ranvis:fix-68447

Conversation

@ranvis
Copy link
Contributor

@ranvis ranvis commented Jul 1, 2016

grapheme_extract() converts UTF-8 string in the argument to UTF-16 to
iterate through graphemes, and count each UTF-16 character as one Unicode
character, which is not correct for UTF-16 surrogate pairs.
The patch removes the conversion and counts UTF-8 directly if needed.

grapheme_extract() converts UTF-8 string in the argument to UTF-16 to
iterate through graphemes, and count each UTF-16 character as one Unicode
character, which is not correct for UTF-16 surrogate pairs.
The patch removes the conversion and counts UTF-8 directly if needed.
@smalyshev smalyshev added the Bug label Sep 5, 2016
@smalyshev smalyshev self-assigned this Sep 5, 2016
@php-pulls php-pulls merged commit df683fa into php:PHP-5.6 Nov 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants