#28169 [NEW]: SimpleXML not parsing scandinavian characters correctly

From: Date: Mon, 26 Apr 2004 19:38:20 +0000
Subject: #28169 [NEW]: SimpleXML not parsing scandinavian characters correctly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-58824@lists.php.net to get a copy of this message
From: mikko dot nylen at pp1 dot inet dot fi Operating system: Gentoo Linux 2.6.5 PHP version: 5CVS-2004-04-26 (dev) PHP Bug Type: SimpleXML related Bug description: SimpleXML not parsing scandinavian characters correctly Description: ------------ When I'm trying to parse XML files/strings containing scandinavian characters (ä, ö, å), I just get cryptic characters. I've tryed to set encoding-attribute to ISO-8859-1 and utf-8. I've also tryed to use &#xe4;, &#x00e4; and &#228; in place of "ä". When I look to test.xml with Mozilla Firefox, Firefox shows the scandinavian characters correctly. I'm using PHP 5.0.0RC2. May this be a bug? My configure line: ------ Configure Command => './configure' '--prefix=/usr/local/php5' '--enable-ftp' '--enable-sockets' '--with-ncurses' '--enable-bcmath' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs=/usr/local/apache/bin/apxs' '--with-pgsql=/usr/bin/pg_config' '--with-bz2' Reproduce code: --------------- The XML file I'm trying to parse: ------ <?xml version="1.0" encoding="iso-8859-1"?> <test> ä ö å </test> ?> The PHP script I'm parsing with: ------ <?php $xml = simplexml_load_file("test.xml"); print_r($xml); ?> Expected result: ---------------- SimpleXMLElement Object ( [0] => ä ö å ) Actual result: -------------- SimpleXMLElement Object ( [0] => ä ö Ã¥ ) -- Edit bug report at http://bugs.php.net/?id=28169&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28169&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28169&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28169&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28169&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28169&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28169&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28169&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28169&r=support Expected behavior: http://bugs.php.net/fix.php?id=28169&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28169&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28169&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28169&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28169&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28169&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28169&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28169&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28169&r=float

« previous php.bugs (#58824) next »