|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-25 18:06 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 17:00:02 2025 UTC |
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>(...)