Solved

XML Parser issue

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending email via Perl on Windows 3 167
remove duplicates from the csv file 13 109
stftime format 4 56
Excel to CSV conversion with specific columns 5 82
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…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…

803 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