|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-02-05 05:10 UTC] jani@php.net
[2008-02-16 12:17 UTC] hirokawa@php.net
[2008-02-24 01:00 UTC] php-bugs at lists dot php dot net
[2008-03-28 09:44 UTC] d_kelsey at uk dot ibm dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 14:00:01 2025 UTC |
Description: ------------ mb_convert_encoding 'destroys' first character when converting from UTF16 to UTF8 (iconv works). Reproduce code: --------------- $utf16 = chr(0xFF).chr(0xFE).chr(0x4d).chr(0).chr(0x6f).chr(0); //'Mo' $utf8 = mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); echo($utf8 . "\n"); // -> ?++???o $utf8 = iconv('UTF-16', 'UTF-8', $utf16); echo($utf8 . "\n"); // -> Mo Expected result: ---------------- mb: (BOM8)Mo iconv: Mo (BOM8) is a placeholder Actual result: -------------- mb: (BOM8)???o (copied from cmd shell) iconv: Mo (BOM8) is a placeholder