|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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???"));
produces:
xyz???
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
No, it still doesn't work here. I got the latest (oct 31) snap from snaps.php.net: # ./configure --with-xml --enable-wddx # make # ./php wddx_test.php X-Powered-By: PHP/4.2.0-dev Content-type: text/html xyz??? wddx_test.php contains the one-liner submitted in my original report: print wddx_deserialize(wddx_serialize_value("xyz???")); /JohanPropably your locales again. Anyway, what does this output: <?php echo wddx_serialize_value("xyz???"); ?>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: <?php print wddx_serialize_value("xyz???") . "\n"; setlocale(LC_ALL, "sv_SE"); print wddx_serialize_value("xyz???"); ?> produces: <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, /Johan