in reply to Re^2: What Voodoo Encoding does RTF use for > ASCII Chars?
in thread What Voodoo Encoding does RTF use for > ASCII Chars?
Judging by your output, your problem is that your string (source code) is UTF-8 encoded, but you have not told Perl about it.
use utf8 if your source code is in UTF-8. In case the data comes from elsewhere, decode it properly before using it.
The UTF-8 encoding of the character 'à' (for example) is the two bytes c3 a0, so if you don't tell Perl that those two bytes are supposed to be decoded into one character, you'll have them incorrectly interpreted as the two latin-1 characters \xc3 and \xa0.
|
---|