|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33517 encoding decoding bug
Submitted: 2005-06-30 13:50 UTC Modified: 2005-06-30 13:54 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: christian at koch dot net Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.0.3 OS: Windows 2003 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
21 + 21 = ?
Subscribe to this entry?

 [2005-06-30 13:50 UTC] christian at koch dot net
a simple xml file like:

<?xml version="1.0" encoding="iso-8859-15" standalone="yes"?>

	<name>?ml?ute sind d??f und ?chei?e</name>

saved as a windows ansi file, loaded with the script

$xml = simplexml_load_file("test.xml");

echo " bla ". $xml->name;

will convert the ansi xml elements into UTF-8 an in the PHP Script you must use utf8_decode(). Ich think thats a bug.

Reproduce code:
$xml = simplexml_load_file("test.xml");

echo " bla ". $xml->name;

Expected result:
if I use a ISO encoded XML file with a valid XML header, the SimpleXMLElement object should provide an iso string.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-30 13:54 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

All XML extensions return UTF8, that is expected.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 12:01:28 2024 UTC