in reply to Question on XML parser
Did you install XML::Encoding? That's the module that gives you additional encodings for XML::Parser. You might also want to read the blurb about Japanese encodings in /opt/src/XML-Encoding-1.01/maps/Japanese_Encodings.msg (or a similar location). From what I get from the message you might have to look at the encoding files to choose the one that really works for you use compile_encoding to generate the proper .enc file, or just rename the appropriate x-sjis-*.xml file to shift-jis.xml.
If you go this route it would be nice if you could post what you did, and maybe contact grantm so he could add it to the Perl-XML FAQ.
An alternate solution would be to convert your documents to UTF-8 using iconv or Encode: XML::Parser will give you all strings in UTF-8 anyway, so you might as well do it pre-emptively. You can then convert your output back to shift-jis using the same technique.
The last option I can think of: you could also change the encoding to one of the variants of shift-jis supported by XML::Encoding, which would give the files a more accurate value for the encoding, but might be a problem if you process them using other tools.
|
|---|