in reply to Detecting Strange Characters in Text?

I am probably over-reliant on this one regexe that converts Latin1 data to utf8:
s/([^\x20-\x7F])/'&#' . ord($1) . ';'/gse;
You can modify it for your means. I think you can also try HTML::Entities.