[tex-live] User names too longs or with diacritics on Windows

Akira Kakuto kakuto at fuk.kindai.ac.jp
Sun Apr 14 01:50:55 CEST 2013

Hi Karl,

> If someone (Akira?) can send me a patch for kpathsea to do the right
> thing on Windows in these cases, that would be welcome.  It is not
> intentional (or desirable) that the returned directory is somehow being
> mangled.

I have tested by the following program "test.exe".
test.exe > test.txt

od -c test.txt


0000000   .   /   C 351   c   i   l   e   .   t   e   x  \r  \n

Thus kpsewhich exactly returns the given string on windows.
I think the present behavior is the best.


*   test.c to test kpsewhich
#include <stdio.h>
#include <process.h>

int main(int argc, char **argv)
  unsigned char s[256], c[256];
  FILE *f;

  s[0] = 'C';
  s[1] = 0xe9;
  s[2] = 'c';
  s[3] = 'i';
  s[4] = 'l';
  s[5] = 'e';
  s[6] = '.';
  s[7] = 't';
  s[8] = 'e';
  s[9] = 'x';
  s[10] = '\0';

  f = fopen (s, "w");
  fprintf(f, "This is a test.\n");
  fprintf(f, "\\bye\n");
  fclose (f);

  strcpy(c, "kpsewhich --path=.// ");
  strcat(c, s);
  return 0;

More information about the tex-live mailing list