|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13873 wddx_*() functions only handle ascii
Submitted: 2001-10-30 11:01 UTC Modified: 2002-01-02 20:58 UTC
From: johan at ekenberg dot se Assigned:
Status: Closed Package: WDDX related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2001-10-30 11:01 UTC] johan at ekenberg dot se
It seems that the wddx_*() functions only handle US-ASCII, although I see a referense to ISO-8859-1 and UTF-8 in the source:

   print wddx_deserialize(wddx_serialize_value("xyz???"));




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-30 18:15 UTC]
Works fine for me with latest CVS. Try a snapshot from


 [2001-10-31 05:41 UTC] johan at ekenberg dot se
No, it still doesn't work here. I got the latest (oct 31) snap from

  # ./configure --with-xml --enable-wddx
  # make
  # ./php wddx_test.php
  X-Powered-By: PHP/4.2.0-dev
  Content-type: text/html


wddx_test.php contains the one-liner submitted in my original report:
  print wddx_deserialize(wddx_serialize_value("xyz???"));


 [2001-10-31 19:28 UTC]
What are your:

- linux distribution
- configure line for PHP


 [2001-11-01 04:26 UTC] johan at ekenberg dot se
1. Linux distribution is Slackware 4.0 which is a libc 5 dist. Running kernel 2.2.19

2. configure --with-xml --enable-wddx
 [2001-11-10 04:25 UTC]
Propably your locales again. Anyway, what does this output:

<?php echo wddx_serialize_value("xyz???"); ?>

 [2001-11-12 10:19 UTC] johan at ekenberg dot se
Nowhere in the docs is it mentioned that wddx-functions are affected by locale settings. But experimenting with setlocale() reveals that it is indeed a locale issue:

   print wddx_serialize_value("xyz???") . "\n";
   setlocale(LC_ALL, "sv_SE");
   print wddx_serialize_value("xyz???");


<wddxPacket version='1.0'><header/><data><string>xyz<char code='FFFFFFE5'/><char code='FFFFFFE4'/><char code='FFFFFFF6'/></string></data></wddxPacket>
<wddxPacket version='1.0'><header/><data><string>xyz???</string></data></wddxPacket>

If this is correct, ie wddx*() _should_ be affected by locale, then I suggest that it be described in the docs as soon as possible!

Thanks for your work and patience,
 [2002-01-02 20:58 UTC]
Documentation fixed.
 [2020-02-07 06:12 UTC]
Automatic comment on behalf of mfischer
Log: - Fix #13873.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 00:01:33 2024 UTC