in reply to Re^6: Error with .xml file processing in XML::Simple
in thread Error with .xml file processing in XML::Simple

Ah, just realised a silly mistake :P It wasn't called .enc :P

Anyway, renamed it - and now get this error:

<pre>./iso-8859-15.enc isn't an encmap file at /usr/lib/perl5/vendor_p +erl/5.8.4/x86_64-linux/XML/Parser.pm line 187 </pre> <p> For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error. </p> [Tue Feb 17 07:09:51 2009] import.cgi: ./iso-8859-15.enc isn't an encm +ap file at /usr/lib/perl5/vendor_perl/5.8.4/x86_64-linux/XML/Parser.p +m line 187


Any more suggestions?

TIA!

Andy

Replies are listed 'Best First'.
Re^8: Error with .xml file processing in XML::Simple
by almut (Canon) on Feb 17, 2009 at 13:19 UTC

    This is what the README has to say about the .enc files:

    These maps were generated by a perl script that comes with the module XML::Encoding, compile_encoding, from XML formatted encoding maps that are distributed with that module. These XML encoding maps were generat +ed in turn with a different script, domap, from mapping information conta +ined on the Unicode version 2.0 CD-ROM. This CD-ROM comes with the Unicode Standard reference manual and can be ordered from the Unicode Consorti +um at http://www.unicode.org. The identical information is available on t +he internet at ftp://ftp.unicode.org/Public/MAPPINGS.

    so, my guess would be that you have to run your 8859-15.TXT file through these two scripts...

    Or, take the easy way out, and redeclare your XML input to be in ISO-8859-1 :)

    ISO-8859-1 is pretty close to ISO-8859-15, but you wouldn't have the Euro sign, for example. See ISO-8859-15 for an exact list of differences.  Depending on what the end output is of your processing chain (i.e., if it's still in ISO-Latin* single-byte encoding, and not something like UTF-8), it might work if you simply redeclare it back to ISO-8859-15 when done.

    ___

    Side note: please don't use <pre>...</pre> tags - at least not for long lines (use <c>...</c> instead). Most browsers don't auto-wrap those lines, but add horizontal scrollbars instead — in short, the page gets messed up... (Your "<pre>This function looks... </pre>" in Re^3: Error with .xml file processing in XML::Simple is definitely too long for <pre>, and some people would even say that 20 chars is 'long').

      Hi,

      Thanks for the helps guys/gals.

      Managed to get it working via this command :)

      `perl -pi.bak -e 's|ISO-8859-15|iso-8859-1|' $file`;

      Cheers

      Andy
        Ok, that SSH line I gave didn't do quite what I wanted.

        I ended up finding the .enc file here as a download :)

        http://www.nabble.com/Bug-380426:-missing-encoding-for-iso-8859-15-td5561114.html

        (just in case anyone else comes across the same issue =))

        Cheers

        Andy