#30951 [Opn->Bgs]: XML document charset unrecognized

From: Date: Wed, 01 Dec 2004 17:46:53 +0000
Subject: #30951 [Opn->Bgs]: XML document charset unrecognized
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69691@lists.php.net to get a copy of this message
 ID:               30951
 Updated by:       johannes@php.net
 Reported By:      neon at neon-line dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         SimpleXML related
 Operating System: FreeBSD 4.10
 PHP Version:      5CVS-2004-12-01 (dev)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

Try echo utf8_decode($xml->Cdata)."\n"; 


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

[2004-12-01 18:20:30] neon at neon-line dot net

Description:
------------
SimpleXML messes up at least ISO-8859-15 charset.

Reproduce code:
---------------
<?PHP
$xmlData = '<?xml version="1.0" encoding="ISO-8859-15"
standalone="yes"
?>
<dataSegment>
        <Cdata>ÄÄöö</Cdata>
</dataSegment>
';
$xml = simplexml_load_string($xmlData);
echo $xml->Cdata."\n";
?>


Expected result:
----------------
ÄÄöö

Actual result:
--------------
Ã
 Ã
  öö



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


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


Thread (2 messages)

« previous php.bugs (#69691) next »