ID:               36775
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ez at daoldskool dot org
 Status:           Open
-Bug Type:         WDDX related
+Bug Type:         Feature/Change Request
 Operating System: OSX Tiger 10.4.5
 PHP Version:      5.1.2
 New Comment:

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()). 


Previous Comments:
------------------------------------------------------------------------

[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] [EMAIL PROTECTED]

Reclassified as feature request.

------------------------------------------------------------------------

[2006-03-18 22:17:27] [EMAIL PROTECTED]

I don't need a "proof", I need short and complete reproduce code with
expected and actual results.

>what php_wddx_deserialize_ex if not an instance of the EXPAT 
>parser : line 1140 parser = XML_ParserCreate("ISO-8859-1")
See ext/xml/compat.c, line 379.

------------------------------------------------------------------------

[2006-03-18 22:09:58] ez at daoldskool dot org

Ok tony, my mistake about EXPAT, i've been confused, please 
accept my apology

but the problem is till there : why instanciate the parser 
with forcing the document encoding to ISO-8859-1 ?

isn't the parser able to detect the document encoding ?

------------------------------------------------------------------------

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
    http://bugs.php.net/36775

-- 
Edit this bug report at http://bugs.php.net/?id=36775&edit=1

Reply via email to