#25089 [NEW]: Foreign characters not correctly handled

From: Date: Thu, 14 Aug 2003 06:43:12 +0000
Subject: #25089 [NEW]: Foreign characters not correctly handled
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45914@lists.php.net to get a copy of this message
From: philippe dot tivolle at free dot fr Operating system: Windows 2000 PHP version: 4.3.1 PHP Bug Type: DOM XML related Bug description: Foreign characters not correctly handled Description: ------------ Hi Here is a XML file using french characters. It is stored in iso-8859-1 format. When getting back text node thanks to PHP node_value() function, I get strange characters for "é" (&Atilde;&copy;) and for "à" (&Atilde;&nbsp;). I have replaced these characters with &#233 and &#xxx value with no luck. I have changed encoding in both my editor and my xml file to utf-8 with no luck too. Can you help me ? Thanks a lot : I'm getting stuck ! Reproduce code: --------------- DTD file : <!ELEMENT message (title, text+)> <!ELEMENT title (#PCDATA)> <!ELEMENT text (#PCDATA)> <!ATTLIST text name CDATA #REQUIRED> XML file : <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE message SYSTEM "message.dtd"> <message> <title>Ajout d'un mot-clé</title> <text name="keywordNotFound">Ce mot-clé n'existe plus</text> <text name="keywordAlreadyFound">Ce mot-clé existe déjà</text> </message> Expected result: ---------------- Ajout d'un mot-clé Actual result: -------------- Ajout d'un mot cl&Atild;&copy; &Atild; and &copy; stand for the real characters I get (I copy-paste them here...) -- Edit bug report at http://bugs.php.net/?id=25089&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25089&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25089&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25089&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25089&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25089&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25089&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25089&r=support Expected behavior: http://bugs.php.net/fix.php?id=25089&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25089&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25089&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25089&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25089&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25089&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25089&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25089&r=gnused

« previous php.bugs (#45914) next »