in reply to XML, Twig, and character encoding

Could you just subclass XML::Twig::Elt and use the elt_class to have XML::Twig use the new class? The new class would use base 'XML::Twig::Elt'; and simply redefine text and attr methods with the conversion added there.

Also, for elements, if they do not include nested elements, maybe you could use the xml_string method, which strips out the outter tag and gives you the text in the output_encoding. This would not work for attributes though.

If this does not give you enough information to solve the problem, post a bit of code that shows your problem, along with the input and expected output. Thanks