http://www.perlmonks.org?node_id=163679


in reply to Ö, Ä, Ü and XML::Simple

I have not used XML::Simple, but shouldn't it pay attention to the encoding specified in the XML declaration? For German, you'd want the Latin-2 alphabet:

<?xml version="1.0" encoding="ISO-8859-2">

I gather that XML::Simple can ride on top of XML::Parser. From the XML::Parser docs:

Expat has built-in encodings for: UTF-8, ISO-8859-1, UTF-16, and US-ASCII. Encodings are set either through the XML declaration encoding attribute or through the ProtocolEncoding option to XML::Parser or XML::Parser::Expat. For encodings other than the built-ins, expat calls the function load_encoding in the Expat package with the encoding name. This function looks for a file in the path list @XML::Parser::Expat::Encoding_Path, that matches the lower-cased name with a '.enc' extension. The first one it finds, it loads.

Matt