[pdftex] [luatex] quote around filename leads to error
Reinhard Kotucha
reinhard.kotucha at web.de
Sun Apr 3 01:06:52 CEST 2016
On 2016-03-30 at 22:00:16 +0200, Ulrike Fischer wrote:
> The following document works fine with pdflatex but gives an error
> with lualatex (the icc-file is part of the pdfx package).
>
> The source of the problems are the quotes around the file name.
> Without them the document works fine.
>
> \documentclass{minimal}
> \immediate\pdfobj stream attr{/N 3^^J/Alternate/DeviceRGB}
> file{"sRGB_IEC61966-2-1_black_scaled.icc"} %error
>
> %\immediate\pdfobj stream attr{/N 3^^J/Alternate/DeviceRGB}
> % file{sRGB_IEC61966-2-1_black_scaled.icc} %works
>
> \begin{document}
> Hello World!
> \end{document}
>
> ! LuaTeX error (ext5): cannot open file for embedding.
> l.10 ...}
> file{"sRGB_IEC61966-2-1_black_scaled.icc"}
It's obviously a bug in pdfTeX:
| Document Class: minimal 2001/05/25 Standard LaTeX minimal class
| )<<"sRGB_IEC61966-2-1_black_scaled.icc">>
pdfTeX claims that it loads a file with double quotes in its name but
such a file actually doesn't exist. pdfTeX obviously removes the
quotes silently before calling fopen(3). This is wrong IMO.
Either pdfTeX shouldn't claim that it loads a nonexistent file (there
is no file with double quotes in its name) or it should issue an
appropriate error message (as LuaTeX already does).
I'm absolutely convinced that LuaTeX's behavior is correct and
desirable. As far as pdfTeX is concerned, it's best to pass arguments
unmodified to fopen(3). Even if pdfTeX doesn't handle the error by
itself, the O/S should trigger ENOFILE ("No such file or directory")
at least.
Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the pdftex
mailing list