http://qs321.pair.com?node_id=1223454


in reply to RT::Client turns occasional binary characters in to wide characters

Tried this?

use Encode qw[encode_utf8 is_utf8]; ... if(is_utf8($mystring)) { $mystring = encode_utf8($mystring); }

This should give you a string with only bytes 0x00 to 0xFF. In all likelyhood, the module you are using is treating incoming data as UTF8 and decodes that into characters.

"For me, programming in Perl is like my cooking. The result may not always taste nice, but it's quick, painless and it get's food on the table."