Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: "Wide character in print"by ikegami (Patriarch) |
on Sep 14, 2009 at 16:38 UTC ( [id://795179]=note: print w/replies, xml ) | Need Help?? |
There are many different ways of representing characters using bytes. These are called "character encodings", or just "encodings" for short. By using :utf8, you told Perl to encode the characters using UTF-8. (Actually, using a superset of UTF-8 specific to Perl, but that's ok.) However, your viewer appears to be assuming the content of the file is encoded using iso-latin-1 (or something). Tell your viewer the file is UTF-8, or use the encoding your viewer expects instead of UTF-8. The latter is done using:
For files encoded using UTF-8, some viewers will react positively to having chr(0xFEFF) as the first character.
In Section
Seekers of Perl Wisdom
|
|