]> git.wh0rd.org Git - tt-rss.git/commitdiff
magpie: convert encoding if needed before parser instantiation
authorAndrew Dolgov <fox@bah.spb.su>
Mon, 13 Aug 2007 06:23:23 +0000 (07:23 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Mon, 13 Aug 2007 06:23:23 +0000 (07:23 +0100)
magpierss/rss_parse.inc

index 0dfa5c7fb0542c89f69f25e2c458d0e35a9515c1..66e5e65f22b40310522b9975aa1720c46bd679e5 100644 (file)
@@ -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 );