ID: 46843
Updated by: [email protected]
Reported By: ty_c at cybozu dot co dot jp
-Status: Open
+Status: Assigned
Bug Type: mbstring related
Operating System: *
PHP Version: 5.2.8
-Assigned To:
+Assigned To: moriyoshi
New Comment:
Assigned to maintainer.
Previous Comments:
------------------------------------------------------------------------
[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