Solved

XML Parser issue

Posted on 2004-08-02
5
447 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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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…
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

691 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