in reply to XML::Twig (keep_encoding)
If you post your complete code, we'll have a better chance to figure out what you are doing. What you posted doesn't output anything!
That said, if you're dealing with UTF-8 input, don't use keep_encoding, it's there mostly for dealing with other encodings.
In Section
Seekers of Perl Wisdom