Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: error parsing utf8 chars using XML DOM parser

by Ninthwave (Chaplain)
on Nov 01, 2011 at 15:07 UTC ( [id://935139]=note: print w/replies, xml ) Need Help??


in reply to error parsing utf8 chars using XML DOM parser

Try telling standard out you have utf8 -

binmode(STDOUT, ":utf8");

worked on my kit I did

use XML::DOM; binmode(STDOUT, ":utf8"); my $XmlParserObj = XML::DOM::Parser->new(); my $doc = $XmlParserObj->parsefile("in.xml"); my $str = $doc->toString(); print $str;

and the output included the characters.

"No matter where you go, there you are." BB

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found