horrendo has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm trying to use XML::Simple to create, read and update an XML config file but I'm obviously missing something regarding encoding.
When I create the XML file for the first time (using XMLout from XML::Simple), I end up with a file without the usual
<?xml version="1.0" encoding="UTF-8"?>line at the top of the file. If I then attempt to read in that file using XML::Simple I get the following warning :
Unable to recognise encoding of this document at /usr/lib/perl5/vendor +_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
If I manually edit the file created with XMLout and insert the encoding directive line, the warning disappears.
How do I avoid this warning?
Thanks a lot
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Simple, XMLout and encoding
by liverpole (Monsignor) on Mar 02, 2010 at 00:15 UTC | |
|
Re: XML::Simple, XMLout and encoding
by almut (Canon) on Mar 02, 2010 at 00:15 UTC | |
by horrendo (Sexton) on Mar 02, 2010 at 02:59 UTC | |
|
Re: XML::Simple, XMLout and encoding
by Jenda (Abbot) on Mar 02, 2010 at 11:06 UTC |