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.
In reply to Re: Cleaning up non 7-bit Ascii Chars for XML-processing
by grantm
in thread Cleaning up non 7-bit Ascii Chars for XML-processing
by liverpole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |