texlive[58646] Master: installer at windows: make sure that output is
commits+preining at tug.org
commits+preining at tug.org
Tue Mar 23 04:34:22 CET 2021
Revision: 58646
http://tug.org/svn/texlive?view=revision&revision=58646
Author: preining
Date: 2021-03-23 04:34:22 +0100 (Tue, 23 Mar 2021)
Log Message:
-----------
installer at windows: make sure that output is not scrambled on non-utf8 setups
Patch by Masamichi Hosoda
Modified Paths:
--------------
trunk/Master/install-tl
trunk/Master/tlpkg/TeXLive/TLWinGoo.pm
Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl 2021-03-23 02:11:47 UTC (rev 58645)
+++ trunk/Master/install-tl 2021-03-23 03:34:22 UTC (rev 58646)
@@ -158,6 +158,12 @@
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 @@
$::LOGFILENAME = "$vars{'TEXDIR'}/install-tl.log";
if (open(LOGF,">$::LOGFILENAME")) {
$::LOGFILE = \*LOGF;
+ if (win32) {
+ binmode (LOGF, ':utf8');
+ }
foreach my $line(@::LOGLINES) {
print $::LOGFILE "$line";
}
Modified: trunk/Master/tlpkg/TeXLive/TLWinGoo.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLWinGoo.pm 2021-03-23 02:11:47 UTC (rev 58645)
+++ trunk/Master/tlpkg/TeXLive/TLWinGoo.pm 2021-03-23 03:34:22 UTC (rev 58646)
@@ -1426,7 +1426,7 @@
my $cmd = 'cmd /c "icacls . /reset && icacls . /inheritance:r'.
' /grant:r *S-1-5-32-544:(OI)(CI)F'.
' /grant:r *S-1-5-11:(OI)(CI)RX /grant:r *S-1-5-32-545:(OI)(CI)RX"';
- log "Making read-only\n".`$cmd`."\n";
+ log "Making read-only\n".Encode::decode(console_out,`$cmd`)."\n";
# go back to original directory
chdir $curdir;
More information about the tex-live-commits
mailing list.