http://www.perlmonks.org?node_id=870924


in reply to Cleaning up non 7-bit Ascii Chars for XML-processing

You might want to pass your data through Encoding::FixLatin to ensure it's converted from the CP1252 data you seem to have, into UTF8.

I'm not clear at all on where in the process your xml_compliance routine is being used, nor why you need it.