ID: 41725 Updated by: [EMAIL PROTECTED] Reported By: gijs at q-go dot com -Status: Open +Status: Assigned Bug Type: WDDX related Operating System: Debian 3 PHP Version: 4.4.7 -Assigned To: +Assigned To: iliaa
Previous Comments: ------------------------------------------------------------------------ [2007-06-18 11:53:13] gijs at q-go dot com 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 this bug report at http://bugs.php.net/?id=41725&edit=1