#25089 [Opn->Bgs]: Foreign characters not correctly handled

From: Date: Thu, 14 Aug 2003 06:47:24 +0000
Subject: #25089 [Opn->Bgs]: Foreign characters not correctly handled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45916@lists.php.net to get a copy of this message
ID: 25089 Updated by: sniper@php.net Reported By: philippe dot tivolle at free dot fr -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: Windows 2000 PHP Version: 4.3.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Too old version. If you can reproduce with the above snapshot, reopen. Previous Comments: ------------------------------------------------------------------------ [2003-08-14 01:45:20] philippe dot tivolle at free dot fr My PHP version is 4.3.0. ------------------------------------------------------------------------ [2003-08-14 01:43:12] philippe dot tivolle at free dot fr 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 this bug report at http://bugs.php.net/?id=25089&edit=1

« previous php.bugs (#45916) next »