[tex-live] bug in TeX Live Utility

Zdenek Wagner zdenek.wagner at gmail.com
Mon Jul 13 21:38:26 CEST 2009

2009/7/13 Manuel Pégourié-Gonnard <mpg at elzevir.fr>:
> Manuel Pégourié-Gonnard a écrit :
>>>> Evidently that binmode is causing double encoding.  I don't remember why
>>>> it's there.
>> I tend to think that the binmode here is not the cause. The cause it that Perl
>> somehow gets utf8 strings without properly marking them as utf8. If all utf8
>> strings are known to be utf8 by Perl, nothing will get
>> double-latin1-to-utf8-encoded.
> I just tested. Changing line 268 of tlpkg/TeXLive/TLPDB.pm to
>    open(TMP, '<:encoding(utf8)', $path) || die "$0: open($path) failed: $!";
> also solves the problem. So I persist in thinking that removing
> binmode(STDOUT, ":utf8");
http://perldoc.perl.org/perluniintro.html says that binmode is needed.

> is not the right solution. If we want tlmgr to output real utf8, we *need* this
> binmode statement.
>> 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. I thought it
> would introduce and implicit :utf8 (equivalent to :encoding(utf8)) in all open()
> statements afterwards, apparently not.
> So this needs further investigation. I'm going to re-read some Perl doc for
> starters.
> Manuel.

Zdeněk Wagner

More information about the tex-live mailing list