Non-ASCII characters in filenames/Unicode

Karl Berry karl at
Wed Mar 9 02:58:46 CET 2022

Hi John,

    1. Where do I look for how these things are done in the TL programs,
    especially any that are written in Perl?  Who should I ask about this?

If you're talking about tlmgr, install-tl, etc., this is the right
place.  Norbert wrote them (for the most part). I see this in tlmgr:

binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");

although I don't see it in install-tl. OTOH, install-tl sets utf8 for
its log file:

    $::LOGFILENAME = "$vars{'TEXDIR'}/install-tl.log";
    if (open(LOGF,">:utf8", $::LOGFILENAME)) {

which it seems tlmgr does not do. (I'm just searching for utf8 in the
sources, so may well be missing something.)

I am somewhat surprised. I know that in the past, it was a source of
tremendous error to assume the terminal was in utf8, or any particular
encoding, so we tried hard to output 7-bit ASCII. And still do, for the
most part, as far as I know. The emphasis stuff inserted by perldoc for
--help is the one exception I can think of, which creates tons of weird
cases requiring playing with the LESS envvars, etc.

Hope this helps somehow. Norbert can surely tell you more, and correct
whatever's wrong in the above. Happy hacking. --best, karl.

More information about the tex-live mailing list.