Kernel Hacks & Weird Filenames

Michael Morrell morrell at hpsal2.HP.COM
Thu May 5 09:21:59 AEST 1988


/ hpsal2:comp.unix.wizards / jc at minya.UUCP (John Chambers) /  5:55 pm  Apr 30, 1988 /

The problem with this argument is:  Just what is a printable character?

John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393)
----------

HP-UX has the routine isprint (most likely all other Un*xes have it too).
So it is not too hard to determine what a printable character is (HP-UX's
implementation includes NLS as well).

As to the whole topic of what belongs in a valid filename, it seems to me
that if you could truly have ANY character in a filename, then things would
be ok, but that isn't the case.  First of all, as others have pointed out,
you have to exclude '\0' and '/'.  In addition, most (all?) shells use some
characters as metacharacters.  To handle filenames which might contain these
characters, the shells had to come up with a host of weird quoting rules.
These rules tend to be imprecisely explained in man pages, are very hard for
new users to grasp (even many experienced users!), and are sufficiently complex
that the implementation of these rules is invariably full of bugs.

In short, I see no gain and many drawbacks to allowing arbitrary characters in
filenames.

   Michael Morrell



More information about the Comp.unix.wizards mailing list