Kernel Hacks & Weird Filenames

Chris Torek chris at mimsy.UUCP
Thu Apr 21 19:53:46 AEST 1988


In article <4895 at chinet.UUCP> les at chinet.UUCP (Leslie Mikesell) writes:
>it is pretty silly to allow non-printable characters in a filename.

This statement can be true, but note that it makes two assumptions:
first, that the file names are to be printed; second, that there are
non-printable characters.  Are these assumptions true?  Let us take
them in reverse.

First, `non-printable characters'.  Well, there are certainly numerous
characters that cannot be printed on the terminal I am using at the
moment (namely my H19).  But this is not precisely the same set as are
non-printable on other displays.  One notable exception is a display
that implements ISO Latin 1; another is a Japanese terminal that
displays Kanji.  One could make the set of allowed characters
terminal-dependent.  Somehow that sounds like an IBM solution.

Second: are file names to be printed?  Certainly most are.  But there
are some that are not---for instance, the lock files used by this very
network news system are formed by putting `L' in front of the message
ID of each article; to lock the quoted article inews creates the file
`/tmp/L<4895 at chinet.UUCP>', which is by no means a convenient handle.
A database system might lock records by creating temporary files formed
by converting the record index to a radix-254 name ('/' and '\0' are
taken) (use radix-126 on 4.2/4.3BSD, unless you remove the kernel
restriction on valid ISO Latin 1 characters first; be sure to prefix
or affix some character to avoid clashes with `.' and `..').

So should the Unix kernel make the (relatively) irrevocable decision
to disallow locally-non-printing characters?  Maybe---but I doubt it.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list