[tex-live] xindy doesn't work on windows

Reinhard Kotucha reinhard.kotucha at web.de
Fri Aug 24 00:16:35 CEST 2012

On 2012-08-23 at 10:58:22 +0200, Ulrike Fischer wrote:

 > Am Thu, 23 Aug 2012 12:46:45 +0900 schrieb Akira Kakuto:
 > > Dear Ulrike,
 > > 
 > >> So the code tries hard to find a tmp-folder without spaces and
 > >> fails only if none can be found.
 > > 
 > > #
 > > # Experiment by
 > > #
 > > use File::Spec;
 > > $xxx = File::Spec->tmpdir();
 > > print $xxx;
 > > 
 > > (1) set TMPDIR="c:¥tst tst tst"
 > >     TMPDIR is considered nonwritable and prints the default
 > >     c:¥temp (c:¥temp exists here).
 > > 
 > > (2) set TMPDIR=c:¥tst tst tst
 > >     TMPDIR is recognized as writable and prints
 > >     c:¥tst tst tst
 > > 
 > > Apparently the double quotes are also considered as characters.
 > > 
 > > In the case
 > > set TMPDIR=c:¥tst tst tst
 > > xindy runs as expected if I use the new xindy.pl:
 > Yes, without quotes this here works fine too and use the standard
 > location:
 > set TMPDIR=%USERPROFILE%\Lokale Einstellungen\Temp
 > (Quotes get added to variables automatically if one use tab
 > expansion, so imho the script should be able to handle them)
Yes, Windows doesn't evaluate quotes when you set environment
variables.  They are included literally.  But then, every other
program is supposed to fail too.  Why should a particular script make
an exception?  From the viewpoint of the OS the variable contains
invalid stuff.  It's not worse than a variable which points to a
non-existent or non-writable directory.  To some extent a program
should be able to assume that the system isn't broken.

 > But this doesn't help with the problem that xindy fails with the
 > default setting of TEMP in the windows system control: I didn't add
 > any explicit quotes there. The variable is set as
 > "%USERPROFILE%\Lokale Einstellungen\Temp" (without the quotes) in
 > system control and imho that is the default set by the windows
 > installation. 

Regardless of how the variable is set, I assume that what Perl sees is
what you see if you type

  echo %TEMP%

.  Does the output look reasonable?
 > I think that this problem has to do with the "short pathname":
 > Somewhere in the script it is not resolved correctly.

I doubt that anything is resolved at all.  I suppose that the content
of %TEMP% is simply prepended to the name of the temporary file and
the resulting string is used as an argument for open().  It's obvious
that it cannot work if the the env var contains literal quotes.

 > This would affect only windows users where "Short File Name
 > Generation" is enabled.

Is this configurable?  If yes, where?

 > I have now added a Variable TMPDIR to my system. Perhaps TeXLife
 > should add such a setting e.g. to tl-cmd.bat.

I fear that setting Unix variables in order to fix Windows problems
isn't the right approach.  I'm sure that Phil agrees with me...  ;)

Did you encounter the problem only with Xindy?  getnonfreefonts
determines temporary directories simarly.  Could you download and
install getnonfreefonts as described at

and send me the output of getnonfreefonts[-sys] --help ?  It tells you
where it would put temporary files.


Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the tex-live mailing list