?
Solved

XML Parser issue

Posted on 2004-08-02
5
Medium Priority
?
478 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
  • 2
3 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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
Suggested Courses

830 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