Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
So I don't see how a while loop would be useful It was an example, with the purpose of demonstrating that you need to set the IO layer only once, and not before every reading operation. Of course you are welcome to deviate from the example. utf8 "\xFB" does not map to Unicode at script line 8. That means that your input is not in UTF-8. Find out which character encoding it is, and use the name in the :encoding($encoding_name) IO layer. Maybe I should be using encode() and decode() but I just don't know how they relate to "use utf8", and "binmode :encoding(UTF-8)". use utf8; has the same effect as adding a decode_utf8 before every string literal in your program. the :encoding(UTF-8) IO layer has the same effect as wrapping input operations in decode calls and output operations in encode calls. The results are not good: all 4 lines are mojibake. Then your next step should be either to find out which character encoding your terminal works with, or set it up to use UTF-8.
Perl 6 - links to (nearly) everything that is Perl 6.
In reply to Re^3: UTF-8 issues with Perl in general and with Spreadsheet::WriteExcel
by moritz
|
|