Perl: the Markov chain saw | |
PerlMonks |
Re: UTF-8 and XML::LibXMLby choroba (Cardinal) |
on Nov 26, 2019 at 12:11 UTC ( [id://11109247]=note: print w/replies, xml ) | Need Help?? |
The behaviour is documented in Encodings Support in XML::LibXML. I don't see what's strange about it: you create a byte string that you later interpret as XML. The document declares its encoding as UTF-8, that's how the $node is interpreted. If you encode the value, you get back the original bytes.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|