Req #36775 [Opn->Csd]: wddx_deserialize is wrong with utf8
| From: | cmb@php.net | Date: | Tue, 15 Aug 2017 00:01:18 +0000 |
| Subject: | Req #36775 [Opn->Csd]: wddx_deserialize is wrong with utf8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210680@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=36775&edit=1
ID: 36775
Updated by: cmb@php.net
Reported by: ez at daoldskool dot org
Summary: wddx_deserialize is wrong with utf8
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: WDDX related
Operating System: OSX Tiger 10.4.5
PHP Version: 5.1.2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This issue is supposed to be resolved with
<https://github.com/php/php-src/commit/995deb9>.
Please correct me if I'm wrong.
Previous Comments:
------------------------------------------------------------------------
[2006-03-18 23:29:50] ez at daoldskool dot org
OK it's not a bug it's a malfunction, call it whatever you
want ...
category feature request accepted if sincere
sorry for disturbing you
cya
------------------------------------------------------------------------
[2006-03-18 23:11:33] tony2001@php.net
It is documented, so it's not a bug.
http://php.net/wddx
Note: If you want to serialize non-ASCII characters you have to convert your data to UTF-8 first
(see utf8_encode() and iconv()).
------------------------------------------------------------------------
[2006-03-18 22:40:33] ez at daoldskool dot org
yep, still a bug
------------------------------------------------------------------------
[2006-03-18 22:38:49] ez at daoldskool dot org
hey, don't be too fast dude !
here is the code, assuming my terminal is unicode compatible
(OS X Tiger 10.4.5);
ezmac:/src/php-src/sapi/cli root# ./php -a
Interactive mode enabled
<?php
$wddx = file_get_contents('wddx_utf8.xml');
echo $wddx;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wddxPacket version='1.0'><header/><data><string>éèôoûî</
string></data></wddxPacket>
echo wddx_deserialize($wddx);
???o??
echo wddx_deserialize(utf8_encode($wddx));
éèôoûî
as you see when wddx_deserialize($wddx), i am expecting
éèôoûî but i got ???o??
i have to rencode the document - i repeat myself, the
docuement is already utf8 - a second time to get the
expected result : wddx_deserialize(utf8_encode($wddx))
are you convinced now ?
this is NOT a feature request for a future release
this a BUG submission
because you should not force the encoding to iso-8859-1 with
the parser
------------------------------------------------------------------------
[2006-03-18 22:19:07] tony2001@php.net
Reclassified as feature request.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=36775
--
Edit this bug report at https://bugs.php.net/bug.php?id=36775&edit=1