From: jdolecek at NetBSD dot org Operating system: Any PHP version: 5.1.5CVS PHP Bug Type: WDDX related Bug description: WDDX serializer encodes all non-ascii characters with <char/>
Description: ------------ The condition which determines if a character in string should be encoded using the <char code="XX"/> construct was changed in php-src/ext/wddx/wddx.c was changed in rev. 1.135 to: if (iscntrl((int)*(unsigned char *)p) || (int)*(unsigned char *)p >= 127) { ...encode using <char code="XX"/>... } This means that _all_ non-ascii characters are encoded with the construct, which explodes the result packet size if non-ascii characters are used. The "|| (int)*(unsigned char *)p >= 127" parts seems as left-over debug code and should be removed. Reproduce code: --------------- // this was not actually tried, this is just code review wddx_serialize_value(char(200)); Expected result: ---------------- <wddxPacket version='1.0'><header/><data><string>Č</string></data></wddxPacket> Actual result: -------------- <wddxPacket version='1.0'><header/><data><string><char code="C8"/></string></data></wddxPacket> -- Edit bug report at http://bugs.php.net/?id=37611&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37611&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37611&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37611&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37611&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37611&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37611&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37611&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37611&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37611&r=support Expected behavior: http://bugs.php.net/fix.php?id=37611&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37611&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37611&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37611&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37611&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37611&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37611&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37611&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37611&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37611&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37611&r=mysqlcfg