#40052 [Bgs]: wddx_deserialize compiling incorrect multibyte strings from <char> nodes
ID: 40052
Updated by: tony2001@php.net
Reported By: tim at whiteinteractive dot com
Status: Bogus
Bug Type: *Unicode Issues
Operating System: Mac OS X & Redhat
PHP Version: 4.4.5RC1
New Comment:
Duplicate of bug #40080.
Previous Comments:
------------------------------------------------------------------------
[2007-01-11 09:41:23] tony2001@php.net
.
------------------------------------------------------------------------
[2007-01-07 22:56:14] tim at whiteinteractive dot com
Interactive example:
http://whiteinteractive.com/utf8bug/test2.php
and source:
http://whiteinteractive.com/utf8bug/test2.phps
------------------------------------------------------------------------
[2007-01-07 22:11:27] tim at whiteinteractive dot com
Description:
------------
Problem with *De*serialization of multibyte characters in WDDX.
Correct sequences of <char> nodes (describing UTF8 characters) are
deserializing incorrectly. I am experiencing this with 4.4.5
(snapshot)on Mac OS X and also 4.3.11 on Redhat.
The newer version serializes into <char> nodes correctly whereas the
older version seems to leave these characters raw, but in both versions
the deserialization is incorrect.
Reproduce code:
---------------
http://whiteinteractive.com/utf8bug/test.phps
Expected result:
----------------
-- Create double byte character --
string(2) "£"
dec: 194 163
bin: 11000010 10100011
hex: C2 A3
-- Serialize with wddx_serialize_value --
<wddxPacket version='1.0'><header/><data><string><char
code='C2'/><char
code='A3'/></string></data></wddxPacket>
-- Deserialize with wddx_deserialize --
string(2) "£"
dec: 194 163
bin: 11000010 10100011
hex: C2 A3
Actual result:
--------------
-- Create double byte character --
string(2) "£"
dec: 194 163
bin: 11000010 10100011
hex: C2 A3
-- Serialize with wddx_serialize_value --
<wddxPacket version='1.0'><header/><data><string><char
code='C2'/><char
code='A3'/></string></data></wddxPacket>
-- Deserialize with wddx_deserialize --
string(2) "��"
dec: 128 163
bin: 10000000 10100011
hex: 80 A3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40052&edit=1
Thread (4 messages)