in reply to Re^2: Problems w/ encoding in terminal
in thread Problems w/ encoding in terminal
When opening the file
open my $OUT, '>:utf8', $filename or die $!;
Or, after opening the file:
open my $OUT, '>', $filename or die $!; binmode $OUT, ':utf8';
Or, if you want all your output be in UTF-8:
use open OUT => ':utf8';
See open, open, binmode for details. You can also use ':encoding(UTF-8)' instead of ':utf8' to let Perl check the validity of the data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Problems w/ encoding in terminal
by humble (Acolyte) on Aug 30, 2013 at 15:05 UTC | |
by choroba (Cardinal) on Aug 31, 2013 at 08:22 UTC | |
by humble (Acolyte) on Aug 31, 2013 at 10:18 UTC | |
by humble (Acolyte) on Sep 02, 2013 at 09:52 UTC | |
by humble (Acolyte) on Sep 02, 2013 at 09:47 UTC | |
|
Re^4: Problems w/ encoding in terminal
by humble (Acolyte) on Aug 30, 2013 at 05:23 UTC |