Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Parsing shift-jis XML with XML::TWIG

by kettle (Beadle)
on Aug 19, 2006 at 00:45 UTC ( [id://568290]=note: print w/replies, xml ) Need Help??


in reply to Parsing shift-jis XML with XML::TWIG

You should check out the information on Binmode: ( http://www.icewalkers.com/Perl/5.8.0/pod/func/binmode.html )

binmode(STDIN, ":shiftjis"); binmode(STDOUT, ":YOUR_DESIRED_OUTPUT_ENCODING");
and probably the Encode module: http://www.ayni.com/perldoc/perl5.8.0/lib/Encode.html

http://www.ayni.com/perldoc/perl5.8.0/lib/Encode.html

In case you can read Japanese: http://www.fl.reitaku-u.ac.jp/~schiba/perl/perlEncoding.html

It is possible to specify or guess the encoding of the file that you are working on, and these links should hopefully put you on the right track. I recently had a similar problem and the above listings led to the solution. However, it isn't precisely clear to me what your problem is: just parsing a japanese encoded page? viewing the results? Hopefully this is of some small help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://568290]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-03-28 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found