From 12b48565216b48aedf510a5b6d31cf4b5a8a8eec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 2 Dec 2009 11:33:39 +0000 Subject: [PATCH] UTF-8 is now set in XML parser --- inc/classes/main/parser/xml/class_XmlParser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/classes/main/parser/xml/class_XmlParser.php b/inc/classes/main/parser/xml/class_XmlParser.php index e21044f7..f8a6273e 100644 --- a/inc/classes/main/parser/xml/class_XmlParser.php +++ b/inc/classes/main/parser/xml/class_XmlParser.php @@ -64,7 +64,8 @@ class XmlParser extends BaseParser implements Parseable { public function parseXmlContent ($content) { // Convert all to UTF8 if (function_exists('recode')) { - $content = recode("html..utf8", $content); + // Recode found, so use it + $content = recode('html..utf8', $content); } else { // @TODO We need to find a fallback solution here $this->partialStub('Cannot find recode extension!'); @@ -76,6 +77,9 @@ class XmlParser extends BaseParser implements Parseable { // Force case-folding to on xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, true); + // Set UTF-8 + xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); + // Get template instance $templateInstance = $this->getTemplateInstance(); -- 2.39.5