Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^9: XML:: DOM and Accented Characters

by almut (Canon)
on Aug 09, 2010 at 11:44 UTC ( #853783=note: print w/replies, xml ) Need Help??


in reply to Re^8: XML:: DOM and Accented Characters
in thread XML:: DOM and Accented Characters

The idea was to not call ->printToFile (which you're doing in all five cases), but to use the suggested code instead:

#!/usr/bin/perl -w use XML::DOM; my $parser = new XML::DOM::Parser; my $doc = $parser->parsefile ("c:\\accentTest.xml"); open my $fh, ">:utf8", "c:\\accentTestOutPut.xml" or die $!; print $fh "\x{FEFF}"; # BOM $doc->print($fh); $doc->dispose;

Replies are listed 'Best First'.
Re^10: XML:: DOM and Accented Characters
by freeflyer (Novice) on Aug 09, 2010 at 12:24 UTC

    Looking back at your post I can't believe I misunderstood you. Been banging my head against the wall all weekend and the answer was there all along :)

    Thanks almut (and everyone else who has helped). It's been a learning experience in perl and reading posts properly ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://853783]
help
Chatterbox?
[Discipulus]: i hope too, vacuum cleaner permitting, 2-3 afternoon to build. Or is the 1:1 serie? ;=)
[Tanktalus]: Sure, no one is active for hours and hours in the cb, so I go to upgrade the db, and then someone is active. Sheesh :)
[Discipulus]: anyway poppins probably died with the last night cold. But is not normal to see them in dec. they must pop in April
NodeReaper eyes the thorns in the side
Discipulus : the party puller!
[Discipulus]: I was trying to solve this but i'm not. my regex-fu is stuck at primary school

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2017-12-18 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (499 votes). Check out past polls.

    Notices?