XML Parsing german special chars

From: Date: Wed, 14 Dec 2005 23:58:24 +0000
Subject: XML Parsing german special chars
Groups: php.general 
Request: Send a blank email to php-general+get-227445@lists.php.net to get a copy of this message
I did some easy xml parsing on the last.fm[1] recent tracklist. I do read in all the tracks and output them encoded with htmlentities(). A lot of german special chars like the Ä (Ä) are transfered to strange followings of an A with any sort of available accent. But it isn't replaced by Ä The xml file does not contain any character encoding information, so how could I tell htmlentities(), there might be some character in the string, which might be a german special char. I never encountered any problems when writing htmlentities('Ähre'); or $var = 'Ähre'; htmlentities($var); but only if I take the strings out of the xml file. If I output the whole xml file all characters are shown as they are supposed to, only if i do the encoding by htmlentities() I get those weird accented letters. any suggestions how to fix this? thanks, Norbert PS: code and link to the output page can be given if needed. [1] www.last.fm

« previous php.general (#227445) next »