|  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
 [2004-12-01 18:20 UTC] neon at neon-line dot net
SimpleXML messes up at least ISO-8859-15 charset.

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

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-01 18:46 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Try echo utf8_decode($xml->Cdata).\"\\n\"; 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Nov 29 09:01:28 2023 UTC