in reply to Hexadecimal Entity Problem in XML::Twig

So, in the "current output" as posted, your data is being converted to utf-8 encoding. If the "keep_encoding" trick mentioned above has anything wrong with it, you could just post-process your data to convert "wide" utf8 characters back to the original hex-numeric code point notation:
$output =~ s/(\P{IsASCII})/sprintf("&#%4x;",$1)/g;
That replaces every non-ASCII character with its hex-unicode entity notation. See "perldoc perlre" about the "\p" and "\P" constructs and character classes.