diff options
author | Norbert Preining <preining@logic.at> | 2021-03-23 03:34:22 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2021-03-23 03:34:22 +0000 |
commit | 909dfc060a5f0f5e1ca8bd16ef551a6ccd9cdd2d (patch) | |
tree | a482d975788749002f3980771ded1a365b96b7d5 /Master/install-tl | |
parent | b8ae22a07f6691b825debf68356839edf93f7bc0 (diff) |
installer@windows: make sure that output is not scrambled on non-utf8 setups
Patch by Masamichi Hosoda
git-svn-id: svn://tug.org/texlive/trunk@58646 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Master/install-tl b/Master/install-tl index 7f40c7a8d25..a56dd3ac56b 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -158,6 +158,12 @@ use TeXLive::TLDownload; use TeXLive::TLPaper; if (win32) { + require Encode::Locale; + Encode::Locale->import (); + binmode (STDIN, ':encoding(console_in)'); + binmode (STDOUT, ':encoding(console_out)'); + binmode (STDERR, ':encoding(console_out)'); + require TeXLive::TLWinGoo; TeXLive::TLWinGoo->import( qw( &is_vista @@ -2492,6 +2498,9 @@ sub do_cleanup { $::LOGFILENAME = "$vars{'TEXDIR'}/install-tl.log"; if (open(LOGF,">$::LOGFILENAME")) { $::LOGFILE = \*LOGF; + if (win32) { + binmode (LOGF, ':utf8'); + } foreach my $line(@::LOGLINES) { print $::LOGFILE "$line"; } |