http://qs1969.pair.com?node_id=254532


in reply to Re3: Latin-1 characters and XML
in thread Latin-1 characters and XML

It doesn't to me seem entirely implausible that a module that can convert escaped, latin-1 characters into unicode could also manage the reverse process. It's a fairly reasonable thing to want to do, after all.
Incidentally, I did try looking at XML::Writer (which I'd assume is one of the many), and it didn't seem to have a method to do this either.
As it happened, I ended up using Unicode::String and a regex ( 's|([\200-\377])|sprintf("&#%i;", ord($1))|ge' ), which works, afaict.