Edit report at https://bugs.php.net/bug.php?id=60306&edit=1
ID: 60306 Updated by: larue...@php.net Reported by: larue...@php.net Summary: Characters lost while converting from cp936 to utf8 -Status: Assigned +Status: Closed Type: Bug Package: mbstring related PHP Version: 5.4.0RC1 Assigned To: laruence Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. 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. Previous Comments: ------------------------------------------------------------------------ [2011-11-18 08:50:18] larue...@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revision&revision=319452 Log: Fixed bug #60306 (Characters lost while converting from cp936 to utf8) ------------------------------------------------------------------------ [2011-11-18 08:40:23] larue...@php.net I have make a fix, re-assign to me, thanks dmitry ;) ------------------------------------------------------------------------ [2011-11-18 05:05:55] larue...@php.net actully, there is a more simple reproduce script: <?php $s = "æ´ªä»"; var_dump(mb_convert_encoding($s, "utf8", "gbk")); ?> save script in fenc=cp936 than, in php 5.4 this result a : string(3) "æ´ª" characters lost while converting from cp936 to utf8. this is really a big problem..... ------------------------------------------------------------------------ [2011-11-17 09:04:53] larue...@php.net seems the characters is lost in the mbfl_buffer_converter_feed2 (called in zend_multibyte_encoding_converter) ------------------------------------------------------------------------ [2011-11-15 08:28:33] larue...@php.net the same script as above, will trigger a abort in this way: $php54 -d mbstring.internal_encoding=cp936 /tmp/1.php php: Zend/zend_language_scanner.l:126: encoding_filter_script_to_internal: Assertion `internal_encoding && zend_multibyte_check_lexer_compatibility(internal_encoding)' failed. Aborted (core dumped) ------------------------------------------------------------------------ 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=60306 -- Edit this bug report at https://bugs.php.net/bug.php?id=60306&edit=1