XML_Tree and unicode problems

From: Date: Tue, 23 Mar 2004 16:05:26 +0000
Subject: XML_Tree and unicode problems
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11454@lists.php.net to get a copy of this message
in brief: how do i tell XML_Tree not to convert special characters, but stick to UTF-8 if and when passed on? --- i have a problem where i couldn't find anything on the list or in the PEAR manual - and studying the sources did not make me a wiser man either... 1. i am using the PEAR package HTML_Quickform with the page encoding UTF-8 what comes from quickform looks like UTF-8 encoding - and displays fine as such 2. after all validation the content from the quickform array is converted into an XML_Tree using the package of the same name. the foreach routine to feed them in one by one goes like this:
    foreach ($lang_keys as $lang_key) {
    	$item = $languagename->addChild($lang_key, $LANG['pairs'][$lang_key]);
    }
the tree is formed perfectly well. the only problem is: 3. when i get the data back from XML_Tree the UTF-8 chars have been transformed. to give you an example: a. typing in the german characters: ö-ä-ü b. quickform passes them on as UTF-8: ö-ä-ü c. then XML_Tree returns them as: ö-ä-ü which is fine, if you want the encoding of the special characters used for the UTF-8 encoding of the special characters. but it's not fine, if you want to store the UTF-8 in a plain file. Micz Flor - micz@mi.cz
content and media development                        http://mi.cz
----------------------------------------------------------------- http://www.campware.org -- http://crash.mi.cz -- http://sue.mi.cz "De kat uit de boom kijken." (Pauline van Mourik Broekman) -----------------------------------------------------------------

« previous php.pear.general (#11454) next »