Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Why use utf8;? As I understand the documentation, its purpose is to enable the source code to be in UTF-8 Yes, that way you avoid concatenating decoded and non-decoded strings. Of course it requires your script to be actually stored in UTF-8. But since the more general solution (use encoding $your_encoding) is severly broken (wrt to AUTOLOAD, thread safety and other issues), that's currently the only sane way to store non-ASCII Perl programs. As for the rest, I can only agree to what ikegami wrote; using IO layers is much more convenient than using encode() and decode() on every IO operation. More importantly since there are fewer spots you have to care about encoding, the probability of forgetting it somewhere (and getting Mojibake in response) is much lower.
Perl 6 - links to (nearly) everything that is Perl 6.
In reply to Re^3: DWIM with non ASCII characters
by moritz
|
|