I used the following code to parse RSS documents:
Code:
$page = file_get_contents($rss);
$feed = new SimpleXMLElement($page);
But it failed to parse some BIG5 encoding RSS and gave this warning:
Code:
Warning: SimpleXMLElement::__construct(): input conversion failed due to input error
here is one example document:
http://rss.chinatimes.com/rss/latestnews.rss
The issue has some inconsistency. Obviously, being an RSS document, the content of the above link changes over time. SimpleXMLElement can parse some instances with no issue at all, but not all instances.