foreach ($encodings as $encoding) { // Change the encoding to UTF-8 (as we always use UTF-8 internally)
if ($utf8_data =
$this->registry->
call('Misc', 'change_encoding', array
($this->raw_data,
$encoding, 'UTF-8'
))) { // Create new parser
$parser =
$this->registry->
create('Parser'
);
// If it's parsed fine
if ($parser->
parse($utf8_data, 'UTF-8',
$this->permanent_url
)) { $this->data =
$parser->
get_data();
if (!
($this->
get_type() & ~SIMPLEPIE_TYPE_NONE
)) { $this->error = "A feed could not be found at `
$this->feed_url`. This does not appear to be a valid RSS or Atom feed.";
$this->registry->
call('Misc', 'error', array
($this->error, E_USER_NOTICE, __FILE__, __LINE__
));
return false;
} if (isset($headers)) { $this->data
['headers'
] =
$headers;
}