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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Mar 28 15:01:29 2024 UTC