php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41725 WDDX character encoding not ISO 8859-1
Submitted: 2007-06-18 11:53 UTC Modified: 2007-06-25 18:06 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: gijs at q-go dot com Assigned: iliaa (profile)
Status: Not a bug Package: WDDX related
PHP Version: 4.4.7 OS: Debian 3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 43 = ?
Subscribe to this entry?

 
 [2007-06-18 11:53 UTC] 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>(...) 




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-25 18:06 UTC] tony2001@php.net
Duplicate of bug #38900.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC