Mantis - Quercus
Viewing Issue Advanced Details
3316 block always 02-04-09 10:23 02-04-09 16:09
koreth  
nam  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003316: simplexml doesn't preserve UTF-8 encoding
<?php
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo><bar>\xc3\xa8</bar></foo>";
$sxml = simplexml_load_string($xml);
print strlen($sxml->bar) . (($sxml->bar == "\xc3\xa8") ? " same" : " not same");

PHP prints "2 same". Quercus prints "1 not same" -- it is apparently decoding the UTF-8 sequence and returning a Unicode string. I don't have PHP6 Unicode semantics enabled.

Notes
(0003802)
nam   
02-04-09 16:09   
php/1x0e