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.