|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25089 Foreign characters not correctly handled
Submitted: 2003-08-14 01:43 UTC Modified: 2003-08-14 01:47 UTC
From: philippe dot tivolle at free dot fr Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.1 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: philippe dot tivolle at free dot fr
New email:
PHP Version: OS:


 [2003-08-14 01:43 UTC] philippe dot tivolle at free dot fr

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 "?" (é) and for "?" (à).

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)>


XML file :

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE message SYSTEM "message.dtd">

	<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>


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...)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-14 01:45 UTC] philippe dot tivolle at free dot fr
My PHP version is 4.3.0.
 [2003-08-14 01:47 UTC]
Please try using this CVS snapshot:
For Windows:

Too old version. If you can reproduce with the above snapshot, reopen.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Sep 22 23:03:39 2021 UTC