#33517 [NEW]: encoding decoding bug

From: Date: Thu, 30 Jun 2005 11:50:52 +0000
Subject: #33517 [NEW]: encoding decoding bug
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81210@lists.php.net to get a copy of this message
From: christian at koch dot net Operating system: Windows 2003 Server PHP version: 5.0.3 PHP Bug Type: SimpleXML related Bug description: encoding decoding bug 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. -- Edit bug report at http://bugs.php.net/?id=33517&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33517&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33517&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33517&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33517&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33517&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33517&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33517&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33517&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33517&r=support Expected behavior: http://bugs.php.net/fix.php?id=33517&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33517&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33517&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33517&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33517&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33517&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33517&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33517&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33517&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33517&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33517&r=mysqlcfg

« previous php.bugs (#81210) next »