Grundle has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to run XML::Simple on a DOCBOOK type XML file, but I am failing on the initial parse because the module cannot find ISO-10646-UCS-2.enc

How can I find this *.enc file, and where do I install it so that the parser will recognize it?

Replies are listed 'Best First'.
Re: 10646 Encoding
by Joost (Canon) on Mar 10, 2005 at 21:44 UTC
    As far as I can see (googling) UCS-2 is a subset of UTF-16.

    The following note is in the XML::Parser docs:

    Expat has built-in encodings for: C<UTF-8>, C<ISO-8859-1>, C<UTF-16>, and C<US-ASCII>. Encodings are set either through the XML declaration encoding attribute or through the ProtocolEncoding option to XML::Parser or XML::Parser::Expat.
    Try modifying the charset entry in the XML file from ISO-10646-UCS-2 to UTF-16 and see if that helps. You can also file a request/bug-report with your findings at the relevant request tracker entry.

Re: 10646 Encoding
by osunderdog (Deacon) on Mar 10, 2005 at 20:10 UTC

    Perhaps your XML file conforms to ISO/IEC 10646? Google "ISO 10646" to find a plethora of information on this.

    It would help to know your OS, situation, code snippet, etc.

    On my linux, box, there are encoding files (lib/XML/Parser/Encodings) that I assume help with some of these international encodings:

    big5.enc euc-kr.enc iso-8859-2.enc iso-8859-3.enc iso-8859-4.enc iso-8859-5.enc iso-8859-7.enc iso-8859-8.enc iso-8859-9.enc windows-1250.enc windows-1252.enc x-euc-jp-jisx0221.enc x-euc-jp-unicode.enc x-sjis-cp932.enc x-sjis-jdk117.enc x-sjis-jisx0221.enc x-sjis-unicode.enc

    however iso-10646 isn't available in my installation of XML Encodings.


    "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.

      I have the same problem, which is why I am asking this question. Even after doing the whole google thing and super-searching I am still unable to find out where to find this particular *.enc file