ID: 28154 Updated by: [EMAIL PROTECTED] Reported By: jay at kuantic dot com -Status: Open +Status: Bogus Bug Type: *XML functions Operating System: * PHP Version: 5.0.0RC2 New Comment:
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 use the iconv or utf8_decode function to convert to your desired charset after getting the values from simplexml. Previous Comments: ------------------------------------------------------------------------ [2004-06-03 19:41:32] jerome dot wagner at oreka dot com OS is not given in the bug. I reproduced the problem on windows XP - php5RC2 ------------------------------------------------------------------------ [2004-04-26 22:05:27] [EMAIL PROTECTED] See also #28169: SimpleXML not parsing scandinavian characters correctly. ------------------------------------------------------------------------ [2004-04-26 11:36:28] jay at kuantic dot com Description: ------------ Simple Xml seems to output only utf-8. No matter how specified in encoding='iso-8859-1' and not simple function to change encodage. Reproduce code: --------------- $xmlstr = <<<XML <?xml version='1.0' encoding='iso-8859-1'?> <root> <section> <title>Gestion des Objets</title> <title>Gestion des Géolocalisation</title> <title>Autres questions...</title> </section> </root> XML; $xml = simplexml_load_string($xmlstr); foreach ($xml->section->title as $title) { echo $title, '<br />'; } ?> Expected result: ---------------- Gestion des Objets Gestion des Géolocalisation Autres questions... Actual result: -------------- Gestion des Objets Gestion des Géolocalisation Autres questions... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28154&edit=1