Edit report at https://bugs.php.net/bug.php?id=41067&edit=1

 ID:                 41067
 Comment by:         tklingenberg at lastflood dot net
 Reported by:        jp at df5ea dot net
 Summary:            This bug applies to 6.x to
 Status:             Closed
 Type:               Bug
 Package:            *Unicode Issues
 PHP Version:        6CVS-2007-04-17 (snap)
 Assigned To:        iliaa
 Block user comment: N
 Private report:     N

 New Comment:

Related: https://bugs.php.net/bug.php?id=62010


Previous Comments:
------------------------------------------------------------------------
[2007-04-23 10:49:18] [email protected]

Merged into HEAD several days ago.

------------------------------------------------------------------------
[2007-04-17 08:25:36] jp at df5ea dot net

I failed to check it in advance, but from looking at the sources of the latest 
CVS snapshot this bug does also apply to PHP 6.x.

Maybe it should be fixed there too.

------------------------------------------------------------------------
[2007-04-16 22:31:13] [email protected]

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------
[2007-04-16 21:15:13] jp at df5ea dot net

http://anna.df5ea.net/~jp/JSON_parser.c.2.patch

This patch only adds code to utf16_to_utf8(). When it encounters a high 
surrogate it looks in the string buffer for a low surrogate. If it has found a 
pair then it replaces the pair with the proper UTF-8 sequence.

utf16_to_utf8() will still emit incorrect UTF-8 when you encode surrogate 
characters outside of pairs. But UTF-16 containg such non-paired surrogate code 
units is incorrect too.

------------------------------------------------------------------------
[2007-04-15 14:39:30] [email protected]

Can you please provide an optimized version of the patch?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=41067


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=41067&edit=1

Reply via email to