in reply to Re^4: UTF-8 and XML::LibXML
in thread UTF-8 and XML::LibXML

You're not putting any data in. You're creating the XML using bytes, you're getting decoded data back from a method, exactly as documented.

This is what putting decoded data in means:

my ($container) = $dom->findnodes('/container'); my $n2 = $container->appendChild('XML::LibXML::Element'->new('node2')) +; $n2->appendText("\N{LATIN CAPITAL LETTER U WITH ACUTE}"); binmode *STDOUT, ':encoding(UTF-8)'; print $dom;

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]