php.net |  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
Votes:1
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
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: christian at koch dot net
New email:
PHP Version: OS:

 

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

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

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

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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

All XML extensions return UTF8, that is expected.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 12:05:52 2022 UTC