Hello,
Despite extensive research on the internet into previous work that has been done on this topic I could not find any useful bit of information. So I hope someone here will be able to help me out.
I am trying to parse and XML file that is shift-jis encoded using XML::Twig. From what I gather, XML::Twig can parse shift-jis assuming the XML is well formed. However, I haven't been able to get it to do that yet. So far I've done the following: in my XML::Parser directory under Parser/Encoding I set my shift-jis encoding file to be x-sjis-unicode.enc (renamed the file to shift-jis.enc).
When I try to parse my XMl file I get the following error:
unknown encoding at line 1, column 30, byte 30 at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/XML/Parser.pm line 185
The first few lines of my XML file look as follows (note the <RetrunString> tag should contain shift-jis characters):
<?xml version="1.0" encoding="shift-jis" ?>
<!DOCTYPE AdminRequest (View Source for full doctype...)> <AdminReques
+t>
<Header>
<ReturnCode>0</ReturnCode>
<ReturnString></ReturnString>
</Header>
Can you please let me know what I am doing wrong or how I can go about parsing shift-jis? If you can point me to examples that'd be appreciated.
Thanks.