Kernel Hacks & Weird Filenames

Leslie Mikesell les at chinet.UUCP
Thu Apr 21 13:42:41 AEST 1988


In article <13041 at brl-adm.ARPA> FRAZIER%AFGLSC.SPAN at star.stanford.edu writes:
>From Scott Preece:
>-------------------------------------------------
>>> I'm not saying I support the idea of prohibiting filenames with embedded
>>> special characters (my immediate question is "Special to whom?" -- what
>
>      This is a very valid point.  To hack the kernel to prohibit
>special characters in filenames would create more headaches than
>...
>For this reason,  I would suggest hacking sh, csh,
>and ksh to reflect this change. 


Great.. Applications can then create files that the standard tools can't
touch.  Did you ever have a filename with an imbedded null?  Oh, is null
a special character...??

The most common problem that I have seen is with applications that use
function keys to respond to menu choices to get to the place where you
would type in a filename to create.  If the response is a bit slow, the
user hits the key again so the function key output becomes part of
the name (ESC-something-something). If they are paying attention, they
might backspace and correct the visible characters, but the ESC is likely
to remain, and unix happily creates the file.  Then they wonder (a) why
they can't access that file again, (b) why the columns don't line up
in a directory listing, and sometimes (c) why some of their other files
don't show up in a directory listing.  I realize that this kind of
behaviour guarantees that I will have a job for a while, but otherwise
it is pretty silly to allow non-printable characters in a filename.
Keeping the restriction out of the kernal would mean that every application
would have to duplicate the code, and if one didn't, nothing else would
touch the file.  Actually, the restriction should only be against creating
files with odd characters; there would be no reason to do a special check
when trying to open an existing file.

  Les Mikesell



More information about the Comp.unix.wizards mailing list