# Re: [NTG-context] { in input file names

Nikolai Weibull wrote:

Hi.
Another one of my sort of weird questions. I have a file with { in it's

weird indeed, are you searching for the limits of tex/context/your-os?

file name and context doesn't seem to enjoy it much:

i only enjoy names that match [a-z0-9\-]

% mkdir {test}
% cd {test}
% mkdir output
% touch a.tex && ed a.tex
0
0a
\starttext
Hello
\stoptext
.
wq
27
% texexec --runpath=output a.tex

You can put this somewhere (cont-loc.tex or so) since i'm not that sure if it does not interfere, so i (and others) need to test this for a long time

% supp-fil

\bgroup % todo: _ cleanup

\catcode\/=\@@active
\catcode\:=\@@active
\catcode\~=\@@active

\gdef\sanitizefilename#1\to#2%
{\bgroup
\edef/{\string/}%
\edef:{\string:}%
\edef~{\string~}%
\expanded{\xdef\noexpand\sanitizedfilename{#1}}%
\egroup
\let#2\sanitizedfilename%
\convertcommand\sanitizedfilename\to#2}

\egroup

% core-job

\def\usepath[#1]%
{\def\docommando##1%
{\doifelse{##1}\v!reset
{\let\allinputpaths\empty}
{\sanitizefilename#1\to\ascii
%\convertcommand\ascii\to\ascii
\processcommalist[#1]\docommando}

\def\usesubpath[#1]% new, see webschrift for usage
{\ifx\allinputpaths\empty
\sanitizefilename#1\to\allinputpaths
\else
\def\docommando##1%
{\def\dodocommando####1%
{\sanitizefilename####1\to\ascii
\fi}
_______________________________________________
`