Subject: | XML::XSPF writes invalid XML for non-ASCII characters |
XML::XSPF::toString carries out entity encoding on the XML document
before returning it. However, strings in XSPF should be UTF-8, not
entity encoded. This causes playlists containing non-ASCII characters
to be rejected by, for example, Squeezecenter and
http://validator.xspf.org/.
Simply commenting out the line
$string = encode_entities($string, '^\n\r\t !\#\$%\(-;=?-~<>&"');
appears to be sufficient to create valid output. Symbols "<", ">", and
"&" still get correctly encoded as "<", ">"; and "&".