From: gijs at q-go dot com Operating system: Debian 3 PHP version: 4.4.7 PHP Bug Type: WDDX related Bug description: WDDX character encoding not ISO 8859-1
Description: ------------ In PHP 4.4.7 WDDX functions convert special characters(ISO 8859-1) to <char code='XX'/>. Apparently the encoding changed to UTF-8 in 4.4.7, while all our data and scripts are in ISO 8859-1. (My company wants to upgrade to PHP version 4.4.7, we now still use 4.3.10-19 which doesn't have this bug.) Reproduce code: --------------- $q = $_GET['q']; // incoming user question 'beëindiging verzekering' echo $q; //building WDDX packet $packet_id = wddx_packet_start("qxq_ask_command"); wddx_add_vars($packet_id,"q"); $packet = wddx_packet_end($packet_id); echo $packet; Expected result: ---------------- I expect the special character 'ë' to be 'as is' encoded in ISO 8859-1 inside the WDDX packet. (...)<var name='q'><string>beëindiging verzekering</string></var>(...) Actual result: -------------- echo $q; // prints 'beëindiging verzekering' correctly Inside the WDDX packet the 'ë' is converted to <char code='EB'/> (...)<var name='q'><string>be<char code='EB'/>indiging verzekering</string></var>(...) -- Edit bug report at http://bugs.php.net/?id=41725&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41725&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41725&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41725&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41725&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41725&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41725&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41725&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41725&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41725&r=support Expected behavior: http://bugs.php.net/fix.php?id=41725&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41725&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41725&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41725&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41725&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41725&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41725&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41725&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41725&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41725&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41725&r=mysqlcfg