From 265127591fc7343620a0c9999107eb51fa477f23 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 22 Jun 2003 07:36:06 +0000 Subject: - Bugfix: fixed the character when importing news feeds. Reported at http://drupal.org/node/view/2036. --- modules/aggregator/aggregator.module | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/aggregator/aggregator.module') diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 9da1b50d3..a59927836 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -268,6 +268,8 @@ function import_refresh($feed) { $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "import_element_start", "import_element_end"); xml_set_character_data_handler($xml_parser, "import_element_data"); + xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, "utf-8"); + if (!xml_parse($xml_parser, $data, 1)) { return t("failed to parse RSS feed '%site': %error at line %line.", array("%site" => $feed["title"], "%error" => xml_error_string(xml_get_error_code($xml_parser)), "%line" => xml_get_current_line_number($xml_parser))); } -- cgit v1.2.3