[tex-live] bug in TeX Live Utility
mpg at elzevir.fr
Mon Jul 13 22:20:51 CEST 2009
Zdenek Wagner a écrit :
>> also solves the problem. So I persist in thinking that removing
>> binmode(STDOUT, ":utf8");
>> is *not* the right solution.
[fixed quoting and highlighted some text]
> http://perldoc.perl.org/perluniintro.html says that binmode is needed.
It's exactly what I'm saying...
>> If we want tlmgr to output real utf8, we *need* this
>> binmode statement.
... isn't it ?
>>> use open IO => ':utf8'; # default encoding for files we open later
>> For some reason, just putting
>> use open IO => ':utf8';
>> right after the BEGIN block in tlmgr.pl doesn't solve the problem.
Oh, well, that was a scoping problem. Such a statement obviously has a file
scope. Copying it in TLPDB.pm solves the problem too.
>> So this needs further investigation. I'm going to re-read some Perl doc for
Ok, so perldoc open helped me get the scoping problem. I also learned there that
use open qw(:utf8 :std);
is a short form for making :utf8 the default encoding for all IO streams
including STD*. So I added such a line in all TeXLive perl modules making any
I/O. This should fix encoding problems as long as every file involved is using utf8.
More information about the tex-live