PArsing XML with PHP....german text issue

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

PArsing XML with PHP....german text issue

Post by kendall »

Hello,

i have created a XMl page from an excel sheet in which the data has german words

in parsing the xml using php the german words arent spelt properly

eg
Düsseldorf, Zakk
come out like
Düsseldorf, Zakk
how do you guys handle this....i think its an error of the document encoding type but i am not sure what to do...
Kendall[/quote]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you need a charset that contains the character
for xml that might be

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
	Düsseldorf, Zakk
</root>
for the html-ouput there are numerous ways to set the charset.
e.g.

Code: Select all

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
or xml-conform in the prolog as well
Post Reply