Forums / Developer / Import XML Data Topic / Comment44875
Vytautas Germanavičius
Thursday 08 December 2005 12:16:08 am
Sorry, but
$fieldValue = utf8_decode($xPathEngine->wholeText("$path_item/$fieldName"."[1]"));
does not solve problem. I'm still getting ??? instead of UTF8 symbols.I do not unerstand, why utf8_decode is used. As i understood from documentation http://lt.php.net/manual/en/function.utf8-decode.php , this function converts string to ISO-8859-1. After such convertion UTF8 symbols are lost...
Problem is that xml_parser reads file as iso-8859-1 and ignores encoding specified in xml file.
This problem should be fixed in xpathengine. I putted to XPatth.class.php line 1680:
$parser = xml_parser_create('UTF-8');
This is only way i found, to get it working with utf-8 ...
{set-block scope=root variable=cache_ttl}0{/set-block}