in reply to UTF-8 problem parsing XML
Assuming the input file is really latin-1, you can do a couple of things:
- Add an XML declaration with an encoding attribute to the XML file - <?xml encoding="iso-8859-1"?> - that should make sure the XML parser will do the right thing.
- Convert the XML to utf8, which you've tried but you got it backwards. The correct statement is $xml = decode('iso-8859-1', $xml);
- Figure out some other way to signal the real encoding to XML::Simple. Not sure if you can.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: UTF-8 problem parsing XML
by rinceWind (Monsignor) on Apr 15, 2007 at 00:01 UTC |
In Section
Seekers of Perl Wisdom