Just another Perl shrine | |
PerlMonks |
in reply to Forcing UTF-8 output on STDOUT
If not, use binmode instead of open:
#!/usr/bin/perl use utf8; use strict; use warnings; binmode *STDOUT, ':utf8'; print "åäöfoo\n";
Using :encoding(UTF-8) instead of :utf8 would turn on some useful checking, too.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Forcing UTF-8 output on STDOUT
by ikegami (Patriarch) on Feb 11, 2021 at 06:21 UTC | |
Re^2: Forcing UTF-8 output on STDOUT
by mldvx4 (Friar) on Feb 12, 2021 at 11:27 UTC | |
Re^2: Forcing UTF-8 output on STDOUT
by mldvx4 (Friar) on Feb 11, 2021 at 17:14 UTC | |
by choroba (Cardinal) on Feb 11, 2021 at 17:16 UTC | |
|