Mar 14, 2007, 7:11 PM
Post #1 of 2
XML / Perl / Unicode
Firstly, I'll start by saying that I do not post on these forums unless I'm really running out of options for finding the information myself. I value the time of everyone who is kind enough to help out here.
I have been writing a Perl tool recently that makes use of XML::Parser to parse the UTF-8 encoded XML files. The tool was actually completed and working, until the source the XML changed its encoding to UCS-2.
Now I've spent months trying to find a straight answer on how to deal with this encoding, as currently the entire program errors out:
[Tue Nov 21 07:53:44 2006] [error] [client xxx.xxx.xxx.xxx] Couldn't open encmap ucs-2.enc:, referer: xxxxxx/analyze
[Tue Nov 21 07:53:44 2006] [error] [client xxx.xxx.xxx.xxx] at /usr/lib/perl5/XML/Parser.pm line 187, referer: xxxxxxx/analyze
I've recently stumbled across XML::Encoding and Im in the process of checking that out.. But all I really need is a source for a ucs-2.enc file to use.
I'm open to any suggestions, and I'm more than happy to be pointed towards a resources I may have missed. I've gone as far as buying books on Perl / XML, that still haven't answered the question.