[luatex] More on loading non-ascii filenames on windows
Ulrike Fischer
luatex at nililand.de
Sun Sep 30 16:21:28 CEST 2018
Am Sun, 30 Sep 2018 11:45:32 +0200 schrieb Patrick Gundlach:
> Hello again,
>
> I am still struggling with loading images with filenames on windows. (My test environment is windows 7, 32 bit)
>
> I now bypass lua file system to build a file list, so I have all filenames encoded as UTF-8. Now I try to pass a filename to
>
> img.scan{...}
>
> But as I understand, Windows is not happy about the UTF8 filenames, so what should I do?
>
> ! error: (pdf backend): reading image file 'Z:\foo\cöw.pdf' failed
> ! ==> Fatal error occurred, no output PDF file produced!
>
> I have tried to pass the CP1250 value for ö (\f6) but this gives me:
>
> I/O Error: Couldn't open file 'c<f6>w.pdf': No error.
>
> ! error: (pdf inclusion): reading image failed
> ! ==> Fatal error occurred, no output PDF file produced!
>
I tried on a windows 10 laptop
\documentclass{article}
\begin{document}%
\directlua{
a = img.write({ filename = "cöw.pdf"})
}
\end{document}
It works with miktex (luatex 1.07) but fails with texlive (1.07 +
1.09).
You could ask on the texlive list, but imho it would be better to
avoid such names. The majority of crashes I saw in last years was
connected to non-ascii in graphics and other files.
--
Ulrike Fischer
https://www.troubleshooting-tex.de/
More information about the luatex
mailing list