Create the following files:
mkdir a
touch a/$'\U10000'.tex
touch a/$'\U4e00'.tex
Compile with xelatex
\RequirePackage{latexbug}
\documentclass{article}
\begin{document}
\IfFileExists{\detokenize{a/^^^^^^010000.tex}}{1}{0}
\IfFileExists{\detokenize{a/^^^^^^004e00.tex}}{1}{0}
\end{document}
bug.log (github.com)
bug.pdf (github.com)
PDF shows 1 1.
PDF shows .tex” 0 1.
It works as expected when I place the files in the top level. This issue was first reported at https://github.com/latex3/latex2e/issues/753 and maintainers suggests that it is a XeTeX bug.
Anonymous