Hi

Context fails to run with an input (filename or directoryname) that includes 
special characters.

example files:
%%%
reviczky@arlequin ~/minimal % la
total 0
drwxrwxr-x 1 reviczky reviczky   60 2011-03-05 19:58 ./
drwxr-xr-x 1 reviczky reviczky 2148 2011-03-05 20:00 ../
drwxrwxr-x 1 reviczky reviczky   40 2011-03-05 19:59 dir~1/
drwxrwxr-x 1 reviczky reviczky   40 2011-03-05 19:59 dir+2/
-rw-rw-r-- 1 reviczky reviczky   34 2011-03-05 19:58 test~1.tex
-rw-rw-r-- 1 reviczky reviczky   34 2011-03-05 19:58 test+2.tex
%%%

fails to run for "test~1.tex", output:
%%%
context test\~1.tex

mtx-context     | run 1: luatex 
--fmt="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en"
 
--lua="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui"
 --backend="pdf" "./test~1.tex"
This is LuaTeX, Version beta-0.66.0-2011030112 (rev 4090) 
 \write18 enabled.
! I can't find file `./test'.
<to be read again> 
                   \penalty 
\CCC:9:126 ->\penalty 
                      \plustenthousand \normalspaceprimitive 
<*> ./test~
           1.tex
Please type another input file name: 
%%%

but giving the filename again it runs:
%%%
...
Please type another input file name: test~1.tex
(test~1.tex

ConTeXt  ver: 2011.02.25 22:03 MKIV  fmt: 2011.3.1  int: english/english

system          > cont-new.mkiv loaded
(/usr/share/texmf/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > test~1.top loaded
(test~1.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv) 
(/usr/share/texmf/tex/context/base/type-otf.mkiv){/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
system          > begin file test~1.tex at line 1
backend         > xmp > using file 
'/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
system          > end file test~1.tex at line 3
 )</usr/share/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
mkiv lua stats  > used config file          - 
/usr/share/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - 
/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d
mkiv lua stats  > input load time           - 0.130 seconds
mkiv lua stats  > stored bytecode data      - 275 modules, 56 tables, 331 chunks
mkiv lua stats  > cleaned up reserved nodes - 33 nodes, 9 lists of 411
mkiv lua stats  > node memory usage         - 19 glue_spec
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances 
(re)created, 2304 calls
mkiv lua stats  > used backend              - pdf (backend for directly 
generating pdf output)
mkiv lua stats  > loaded patterns           - en::2
mkiv lua stats  > language load time        - 0.057 seconds , nofpatterns: 1
mkiv lua stats  > callbacks                 - 2440 direct, 2929 indirect, 5369 
total
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 11 lpath 
calls, 0 cached calls
mkiv lua stats  > result saved in file      - test~1.pdf
mkiv lua stats  > loaded fonts              - 33 files: stmary10.afm eufb10.tfm 
eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm 
lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf 
lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf 
lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf 
lmsans9-regular.otf lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm 
lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats  > fonts load time           - 0.506 seconds 
mkiv lua stats  > luatex banner             - this is luatex, version 
beta-0.66.0-2011030112 (rev 4090)
mkiv lua stats  > control sequences         - 29651 of 165536
mkiv lua stats  > current memory usage      - 32 MB (ctx: 33 MB)
mkiv lua stats  > runtime                   - 54.133 seconds, 1 processed 
pages, 1 shipped pages, 0.018 pages/second
%%%

It works with the "+" character though.
The same problem goes for the directory names; directories with "~" in the name 
drops and error, even if the filename has no special characters in it.

Can this be fixed?

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to