php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30951 XML document charset unrecognized
Submitted: 2004-12-01 18:20 UTC Modified: 2004-12-01 18:46 UTC
From: neon at neon-line dot net Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5CVS-2004-12-01 (dev) OS: FreeBSD 4.10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: neon at neon-line dot net
New email:
PHP Version: OS:

 

 [2004-12-01 18:20 UTC] 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:
--------------
?
 ?
  ΓΆΓΆ


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-01 18:46 UTC] johannes@php.net
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\"; 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 13 23:01:26 2024 UTC