in reply to Re: DWIM with non ASCII characters
in thread DWIM with non ASCII characters
Decode everything that comes from the outside. Encode everything that leaves your program. use utf8;
Why use utf8;? As I understand the documentation, its purpose is to enable the source code to be in UTF-8 (so you can do e.g. my $ñ = 'foo'; where 'ñ' is not a single byte). It even says "Do not use this pragma for anything else than telling Perl that your script is written in UTF-8".
I thought the preferred way to decode/encode the program's input/output was by using Encode.
--
David Serrano
(Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling errors. Thank you!).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: DWIM with non ASCII characters
by moritz (Cardinal) on May 07, 2010 at 07:58 UTC | |
Re^3: DWIM with non ASCII characters
by ikegami (Patriarch) on May 07, 2010 at 07:48 UTC | |
by Hue-Bond (Priest) on May 07, 2010 at 08:23 UTC | |
by almut (Canon) on May 07, 2010 at 15:10 UTC | |
by Hue-Bond (Priest) on May 07, 2010 at 21:06 UTC | |
by ikegami (Patriarch) on May 07, 2010 at 16:09 UTC |
In Section
Seekers of Perl Wisdom