in reply to Re^2: XML encoding problem
in thread XML encoding problem

You're simply creating an object, you don't actually need it to pass the string to it. Use Unicode::String->stringify_as('latin1'); instead, see Unicode::String documentation :

$us = Unicode::String->new( $initial_value )
(...)
In general it is recommended to import and use one of the encoding specific constructor functions instead of invoking this method.