?
Solved

XML Parser issue

Posted on 2004-08-02
5
Medium Priority
?
460 Views
Last Modified: 2012-06-27
Hi All,

Couldn't open encmap shift-jis.enc:
No such file or directory at /mnt/ims/perl/5.8.0/lib/site_perl/5.8.0/PA-RISC2.0-thread-multi-LP64/XML/Parser.pm line 180

The error mentioned above occurs rarely. It doesnt seem to be happening under all cases.
Any ideas as why and when this error occurs?

Thanks in advance,
Lakshmi
0
Comment
Question by:lakshminair
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 20

Accepted Solution

by:
jmcg earned 400 total points
ID: 11700744
Well, "shift-jis.enc" would be an encoding map that the XML::Parser module is looking for. It is only going to look for it on occasions when it encounters an input that calls for this encoding.

The error message actually originates in the XML::Parser::Expat::new routine. The encoding maps are looked for in the Encodings directory under the XML::Parser path, so to avoid this error, you would need to find the correct shift-jis.enc file and install it at

/mnt/ims/perl/5.8.0/lib/site_perl/5.8.0/PA-RISC2.0-thread-multi-LP64/XML/Parser/Encodings/shift-jis.enc

=========

Unfortunately, I couldn't readily locate this file for you. The only hint I have is the contents of this file:

http://search.cpan.org/src/MSERGEANT/XML-Parser-2.34/Parser/Encodings/README

which mentions that shift_jis.enc is a file that used to be distributed, but no longer is.

I wonder whether it's an error that one mentions shift-jis.enc with a hyphen and the other mentions shift_jis.enc with an underscore.
0
 

Author Comment

by:lakshminair
ID: 11702286
my xml format is something like this

<?xml version='1.0' encoding='UTF-8'?>  - XML::Parser works fine.

But in some cases, the format is

<?xml version='1.0' encoding='shift-jis'?>

now it fails.
when parser sees the encoding tag, does it try to check for some enc file???
is that why it is checking for shift-jis.enc file and not finding it.

lakshmi
0
 
LVL 20

Expert Comment

by:jmcg
ID: 11705337
Yes, that's what would cause the module to go looking for the shift-jis encoding map.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question