#40052 [NEW]: wddx_deserialize compiling incorrect multibyte strings from <char> nodes
From: tim at whiteinteractive dot com
Operating system: Mac OS X & Redhat
PHP version: 4.4.5RC1
PHP Bug Type: *Unicode Issues
Bug description: wddx_deserialize compiling incorrect multibyte strings from <char> nodes
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 bug report at http://bugs.php.net/?id=40052&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40052&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40052&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40052&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40052&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40052&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40052&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40052&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40052&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40052&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40052&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40052&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40052&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40052&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40052&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40052&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40052&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40052&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40052&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40052&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40052&r=mysqlcfg
Thread (4 messages)
- tim at whiteinteractive dot com