in reply to XML::Twig and file encoding
... somethings wrong ...
Great :) prove it
Finish this program, post it, and post the output
#!/usr/bin/perl -- use Path::Tiny qw/ path /; use Data::Dump qw/ dd /; my $infile = 'three-lines-unicode.xml'; my $outfile = 'three-lines-uniWHAT.xml'; dd( path( $infile )->slurp_utf8 ); getTwiggy( $infile , $outfile ); dd( path( $outfile )->slurp_raw ); sub getTwiggy { ## minimal demo of Twig not what you want } __END__
But you probably don't want to use http://xmltwig.org/xmltwig/twig_dev.html#METHODS_XML_Twig_new_keep_encoding This is a (slightly?) evil option: if the XML document is not UTF-8 encoded
xmltwig.org keep-encoding site:xmltwig.org keep-encoding
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::Twig and file encoding
by slugger415 (Monk) on Jul 31, 2014 at 17:42 UTC | |
by Anonymous Monk on Aug 01, 2014 at 02:25 UTC | |
by slugger415 (Monk) on Aug 01, 2014 at 17:08 UTC | |
by slugger415 (Monk) on Aug 01, 2014 at 17:11 UTC | |
by Anonymous Monk on Aug 02, 2014 at 08:30 UTC | |
|