ID:               46843
 Updated by:       [email protected]
 Reported By:      ty_c at cybozu dot co dot jp
-Status:           Assigned
+Status:           Closed
 Bug Type:         mbstring related
 Operating System: *
 PHP Version:      5.2.8
 Assigned To:      moriyoshi
 New Comment:

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-01-27 10:35:25] [email protected]

Assigned to maintainer.

------------------------------------------------------------------------

[2008-12-12 09:07:03] ty_c at cybozu dot co dot jp

Description:
------------
(Actual)
mb_convert_encoding() mistranslates the Euro symbol (€, Unicode 
codepoint U+20AC) into character encoding CP936 as:

0x00 0x80


(Expected)
The correct translation is:

0x80


(Affects)
This defect is present in CVS HEAD, & version 4.4.7.


(Patch)

Index: php/ext/mbstring/libmbfl/filters/mbfilter_cp936.c
===================================================================
--- php/ext/mbstring/libmbfl/filters/mbfilter_cp936.c (revision 15404)
+++ php/ext/mbstring/libmbfl/filters/mbfilter_cp936.c (revision 22611)
@@ -193,5 +193,5 @@
        }
        if (s >= 0) {
-               if (s < 0x80) { /* latin */
+               if (s <= 0x80) {        /* latin + euro sign */
                        CK((*filter->output_function)(s, filter-
>data));
                } else {






------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46843&edit=1

Reply via email to