Solved

XML Parser issue

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now