From: Andrew Dolgov Date: Mon, 13 Aug 2007 06:23:23 +0000 (+0100) Subject: magpie: convert encoding if needed before parser instantiation X-Git-Tag: 1.2.14~47 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=458cb9097acd52e0a67d348137c47d0eb9792e99;p=tt-rss.git magpie: convert encoding if needed before parser instantiation --- diff --git a/magpierss/rss_parse.inc b/magpierss/rss_parse.inc index 0dfa5c7f..66e5e65f 100644 --- a/magpierss/rss_parse.inc +++ b/magpierss/rss_parse.inc @@ -149,11 +149,11 @@ class MagpieRSS { $enc = mb_detect_encoding($string); } + $source = mb_convert_encoding($source, "UTF-8", $enc); + list($parser, $source) = $this->create_parser($source, $output_encoding, $input_encoding, $detect_encoding); - $source = mb_convert_encoding($source, "UTF-8", $enc); - $this->parser = $parser; xml_set_object( $this->parser, $this );