updated utf-8 channel settings in Perl impls
This commit is contained in:
@@ -15,12 +15,9 @@ $SIG{__WARN__} = sub {
|
||||
warn $m;
|
||||
};
|
||||
|
||||
# Make STDOUT/STDERR UTF-8 aware so decoded Unicode (model output, tool
|
||||
# results) prints cleanly instead of triggering "Wide character in print".
|
||||
binmode(STDOUT, ':encoding(UTF-8)');
|
||||
binmode(STDERR, ':encoding(UTF-8)');
|
||||
use File::Path qw(make_path); use POSIX qw(strftime); use Term::ReadLine;
|
||||
binmode $_ => ':encoding(UTF-8)' for *STDIN, *STDOUT, *STDERR;
|
||||
|
||||
use File::Path qw(make_path); use POSIX qw(strftime); use Term::ReadLine;
|
||||
use constant MAX_DEPTH => 5;
|
||||
|
||||
my $home = $ENV{HOME} || $ENV{USERPROFILE} || '.';
|
||||
|
||||
@@ -6,7 +6,7 @@ use strict; use warnings; use HTTP::Tiny; use JSON::PP; use POSIX qw(strftime);
|
||||
|
||||
$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /^Use of uninitialized value \$err in numeric eq \(==\) at .*IO\/Socket\/IP\.pm line \d+/ };
|
||||
|
||||
binmode(STDOUT, ':encoding(UTF-8)'); binmode(STDERR, ':encoding(UTF-8)'); binmode(STDIN, ':encoding(UTF-8)');
|
||||
binmode $_ => ':encoding(UTF-8)' for *STDIN, *STDOUT, *STDERR;
|
||||
|
||||
$| = 1; # unbuffered output: live spinner, responsive prompt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user