magpie: convert encoding if needed before parser instantiation

This commit is contained in:
Andrew Dolgov 2007-08-13 07:23:23 +01:00
parent af856f1598
commit 458cb9097a
1 changed files with 2 additions and 2 deletions

View File

@ -149,11 +149,11 @@ class MagpieRSS {
$enc = mb_detect_encoding($string); $enc = mb_detect_encoding($string);
} }
$source = mb_convert_encoding($source, "UTF-8", $enc);
list($parser, $source) = $this->create_parser($source, list($parser, $source) = $this->create_parser($source,
$output_encoding, $input_encoding, $detect_encoding); $output_encoding, $input_encoding, $detect_encoding);
$source = mb_convert_encoding($source, "UTF-8", $enc);
$this->parser = $parser; $this->parser = $parser;
xml_set_object( $this->parser, $this ); xml_set_object( $this->parser, $this );