Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.5
-
Fix Version/s: 1.9.6
-
Component/s: Zend_Feed_Reader
-
Labels:None
Description
getEncoding() returns null when it's not specified in an XML document. This gets passed to html_entity_decode() which assumes latin1 where it should be UTF-8. This results in warnings and broken Unicode characters.
html_entity_decode(): charset `ANSI_X3.4-1968' not supported, assuming iso-8859-1 in Zend/Feed/Reader/Entry/Rss.php:328"
I managed to work around it with code below, but I think getEncoding() should never return null, but UTF-8 instead.
if (! $feed->getDomDocument()->encoding) {
$feed->getDomDocument()->encoding = 'UTF-8';
}
Fixed in r19040 to return a default value.