Bug in calls to perl scripts from Windows executables in TeXLive 2023?
John Collins
jcc8 at psu.edu
Fri Jul 21 18:18:40 CEST 2023
On 7/20/23 7:11 PM, Norbert Preining wrote:
> On Thu, 20 Jul 2023, John Collins wrote:
>> latexmk "-outdir=special ä" test.tex
>> pdfcrop "test ä.pdf"
>>
>> Then the arguments received by the Perl script in each case contain the
>> double quote characters. For example, pdfcrop thinks it is asked to use a
>> file named '"test ä.pdf"' instead of 'test ä.pdf'. This naturally produces
>> various kinds of strange error, whose actual cause is not immediately clear.
>
> I don't think this is a TeX Live not latexmk issue, but a problem of which
> shell you are using. If those are normal double quotes, then they should
> be removed by the invoking interactive shell before passing the arguments
> on to latexmk.
>
> Again, this is nothing *we* have influence on, since this happens at the
> interactive command interpreter level.
>
> At least that is my interpretation. But if any system passes on the doubl
> quotes, that would be rather uncommon.
I don't see that it is a matter of the shell, since I am quoting the arguments
on the command line in a standard way. This is also a Windows-specific issue.
As I assume you know, on Windows, the program invoked by a command like
latexmk or pdfcrop is a corresponding binary executable (e.g., latexmk.exe,
pdfcrop.exe) that finds the script and applies a perl interpreter on it. Those
binaries are all copies of runscript.exe.
Whether or not a problem occurs with quotes depends on which external perl
interpreter is used, when **exactly the same** command line is given. That, I
think, eliminates the command interpreter as the issue. The issue is
localized downstream, maybe somewhere in TeXLive, in the particular way it
invokes the perl program, in conjunction with some issues in Windows, or in the
perl program itself.
As I stated in my original message, if I directly invoke perl on a script with
further quoted arguments, e.g.,
perl c:\texlive\2023\texmf-dist\scripts\latexmk\latexmk.pl "-outdir=special
ä" test.tex
the quotes are removed before the script sees the arguments.
So that seems to suggest that the problem arises in the particular way in which
runscript.exe/tlu invokes external interpreters, in interaction with special
properties of msys's perl.exe.
Best regards,
John
More information about the tex-live
mailing list.