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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gijs at q-go dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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 Dec 06 12:01:46 2024 UTC