Bug #60306 [Asn]: zend-multibyte failed in 5.4
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:zend-multibyte failed in 5.4 Status: Assigned Type: Bug Package:mbstring related PHP Version:5.4.0RC1 -Assigned To:dmitry +Assigned To:laruence Block user comment: N Private report: N New Comment: I have make a fix, re-assign to me, thanks dmitry ;) Previous Comments: [2011-11-18 05:05:55] larue...@php.net actully, there is a more simple reproduce script: 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) [2011-11-15 08:27:09] larue...@php.net if I change the script to: also set fenc=cp936, then a memory leak will be reported: $ php54 -d mbstring.internal_encoding=utf8 -dzend.script_encoding=cp936 /tmp/1.php string(7) "洪�" [Tue Nov 15 16:26:36 2011] Script: '/tmp/1.php' ***php-src/trunk/ext/mbstring/mbstring.c(612) : Freeing 0x2A95DDDF68 (131 bytes), script=/tmp/1.php === Total 1 memory leaks detected === [2011-11-15 07:37:53] larue...@php.net dmitry, plz look at this, thanks :) 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
Bug #60306 [Asn]: zend-multibyte failed in 5.4
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:zend-multibyte failed in 5.4 Status: Assigned Type: Bug Package:mbstring related PHP Version:5.4.0RC1 Assigned To:dmitry Block user comment: N Private report: N New Comment: actully, there is a more simple reproduce script: 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. Previous Comments: [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) [2011-11-15 08:27:09] larue...@php.net if I change the script to: also set fenc=cp936, then a memory leak will be reported: $ php54 -d mbstring.internal_encoding=utf8 -dzend.script_encoding=cp936 /tmp/1.php string(7) "æ´ªä»?" [Tue Nov 15 16:26:36 2011] Script: '/tmp/1.php' ***php-src/trunk/ext/mbstring/mbstring.c(612) : Freeing 0x2A95DDDF68 (131 bytes), script=/tmp/1.php === Total 1 memory leaks detected === [2011-11-15 07:37:53] larue...@php.net dmitry, plz look at this, thanks :) [2011-11-15 07:29:21] larue...@php.net Description: same script, same ini, 5.4 result a wrong result . Test script: --- save the test script in fenc=cp936. run: php53 -dmbstring.internal_encoding=utf8 test.php and php54 -dmbstring.internal_encoding=utf8 test.php Expected result: string(9) "æ´ªä»ç" Actual result: -- 5.3 works fine. but 5.4 output: string(3) "æ´ª" -- Edit this bug report at https://bugs.php.net/bug.php?id=60306&edit=1
Bug #60306 [Asn]: zend-multibyte failed in 5.4
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:zend-multibyte failed in 5.4 Status: Assigned Type: Bug Package:mbstring related PHP Version:5.4.0RC1 Assigned To:dmitry Block user comment: N Private report: N New Comment: seems the characters is lost in the mbfl_buffer_converter_feed2 (called in zend_multibyte_encoding_converter) Previous Comments: [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) [2011-11-15 08:27:09] larue...@php.net if I change the script to: also set fenc=cp936, then a memory leak will be reported: $ php54 -d mbstring.internal_encoding=utf8 -dzend.script_encoding=cp936 /tmp/1.php string(7) "æ´ªä»?" [Tue Nov 15 16:26:36 2011] Script: '/tmp/1.php' ***php-src/trunk/ext/mbstring/mbstring.c(612) : Freeing 0x2A95DDDF68 (131 bytes), script=/tmp/1.php === Total 1 memory leaks detected === [2011-11-15 07:37:53] larue...@php.net dmitry, plz look at this, thanks :) [2011-11-15 07:29:21] larue...@php.net Description: same script, same ini, 5.4 result a wrong result . Test script: --- save the test script in fenc=cp936. run: php53 -dmbstring.internal_encoding=utf8 test.php and php54 -dmbstring.internal_encoding=utf8 test.php Expected result: string(9) "æ´ªä»ç" Actual result: -- 5.3 works fine. but 5.4 output: string(3) "æ´ª" -- Edit this bug report at https://bugs.php.net/bug.php?id=60306&edit=1
Bug #60306 [Asn]: zend-multibyte failed in 5.4
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:zend-multibyte failed in 5.4 Status: Assigned Type: Bug Package:mbstring related PHP Version:5.4.0RC1 Assigned To:dmitry Block user comment: N Private report: N New Comment: 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) Previous Comments: [2011-11-15 08:27:09] larue...@php.net if I change the script to: also set fenc=cp936, then a memory leak will be reported: $ php54 -d mbstring.internal_encoding=utf8 -dzend.script_encoding=cp936 /tmp/1.php string(7) "æ´ªä»?" [Tue Nov 15 16:26:36 2011] Script: '/tmp/1.php' ***php-src/trunk/ext/mbstring/mbstring.c(612) : Freeing 0x2A95DDDF68 (131 bytes), script=/tmp/1.php === Total 1 memory leaks detected === [2011-11-15 07:37:53] larue...@php.net dmitry, plz look at this, thanks :) [2011-11-15 07:29:21] larue...@php.net Description: same script, same ini, 5.4 result a wrong result . Test script: --- save the test script in fenc=cp936. run: php53 -dmbstring.internal_encoding=utf8 test.php and php54 -dmbstring.internal_encoding=utf8 test.php Expected result: string(9) "æ´ªä»ç" Actual result: -- 5.3 works fine. but 5.4 output: string(3) "æ´ª" -- Edit this bug report at https://bugs.php.net/bug.php?id=60306&edit=1
Bug #60306 [Asn]: zend-multibyte failed in 5.4
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:zend-multibyte failed in 5.4 Status: Assigned Type: Bug Package:mbstring related PHP Version:5.4.0RC1 Assigned To:dmitry Block user comment: N Private report: N New Comment: if I change the script to: also set fenc=cp936, then a memory leak will be reported: $ php54 -d mbstring.internal_encoding=utf8 -dzend.script_encoding=cp936 /tmp/1.php string(7) "æ´ªä»?" [Tue Nov 15 16:26:36 2011] Script: '/tmp/1.php' ***php-src/trunk/ext/mbstring/mbstring.c(612) : Freeing 0x2A95DDDF68 (131 bytes), script=/tmp/1.php === Total 1 memory leaks detected === Previous Comments: [2011-11-15 07:37:53] larue...@php.net dmitry, plz look at this, thanks :) [2011-11-15 07:29:21] larue...@php.net Description: same script, same ini, 5.4 result a wrong result . Test script: --- save the test script in fenc=cp936. run: php53 -dmbstring.internal_encoding=utf8 test.php and php54 -dmbstring.internal_encoding=utf8 test.php Expected result: string(9) "æ´ªä»ç" Actual result: -- 5.3 works fine. but 5.4 output: string(3) "æ´ª" -- Edit this bug report at https://bugs.php.net/bug.php?id=60306&edit=1