cvs: php-src(PHP_5_2) / NEWS /ext/mbstring/libmbfl/filters mbfilter_cp936.c /ext/mbstring/tests bug46843.phpt

From: Date: Mon, 02 Feb 2009 04:54:11 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/mbstring/libmbfl/filters mbfilter_cp936.c /ext/mbstring/tests bug46843.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-56063@lists.php.net to get a copy of this message
moriyoshi Mon Feb 2 04:54:11 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/mbstring/tests bug46843.phpt Modified files: /php-src NEWS /php-src/ext/mbstring/libmbfl/filters mbfilter_cp936.c Log: - MFH: Fix bug #46843 (CP936 euro symbol is not converted properly) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1403&r2=1.2027.2.547.2.1404&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1403 php-src/NEWS:1.2027.2.547.2.1404 --- php-src/NEWS:1.2027.2.547.2.1403 Mon Jan 26 19:12:10 2009 +++ php-src/NEWS Mon Feb 2 04:54:10 2009 @@ -50,6 +50,7 @@ - Fixed bug #46887 (Invalid calls to php_error_docref()). (oeriksson at mandriva dot com, Ilia) - Fixed bug #46873 (extract($foo) crashes if $foo['foo'] exists). (Arnaud) +- Fixed bug #46843 (CP936 euro symbol is not converted properly). (Moriyoshi) - Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value inside a binary or image column type). (Ilia) - Fixed bug #46782 (fastcgi.c parse error). (Matt) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_cp936.c?r1=1.1&r2=1.1.8.1&diff_format=u Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_cp936.c diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_cp936.c:1.1 php-src/ext/mbstring/libmbfl/filters/mbfilter_cp936.c:1.1.8.1 --- php-src/ext/mbstring/libmbfl/filters/mbfilter_cp936.c:1.1 Sat Aug 23 06:18:36 2003 +++ php-src/ext/mbstring/libmbfl/filters/mbfilter_cp936.c Mon Feb 2 04:54:10 2009 @@ -192,7 +192,7 @@ } } if (s >= 0) { - if (s < 0x80) { /* latin */ + if (s <= 0x80) { /* latin */ CK((*filter->output_function)(s, filter->data)); } else { CK((*filter->output_function)((s >> 8) & 0xff, filter->data)); http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/bug46843.phpt?view=markup&rev=1.1 Index: php-src/ext/mbstring/tests/bug46843.phpt +++ php-src/ext/mbstring/tests/bug46843.phpt --TEST-- Bug #46843 (CP936 euro symbol is not converted properly) --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> --FILE-- <?php var_dump(bin2hex(mb_convert_encoding("\x80", 'UCS-2BE', 'CP936'))); var_dump(bin2hex(mb_convert_encoding("\x20\xac", 'CP936', 'UCS-2BE'))); ?> --EXPECT-- string(4) "20ac" string(2) "80"

« previous php.cvs (#56063) next »