|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-11 08:18 UTC] sjoerd@php.net
[2009-09-11 08:21 UTC] jani@php.net
[2009-09-11 08:22 UTC] svn@php.net
[2009-09-11 14:34 UTC] jani@php.net
[2009-09-11 21:07 UTC] moriyoshi@php.net
[2009-09-23 14:27 UTC] moriyoshi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 05:00:01 2025 UTC |
Description: ------------ The first character of a UTF-16 string prefixed by "\xff\xfe" (LE BOM) gets converted to wrong Unicode codepoint. Moreover, the resulting string contains the BOM itself while it is uncalled for. Reproduce code: --------------- <?php var_dump(bin2hex(mb_convert_encoding("\xff\xfe\x01\x02\x03\x04", "UCS-2", "UTF-16"))); ?> Expected result: ---------------- string(8) "02010403" Actual result: -------------- string(12) "feffff010403"