Path: utzoo!mnetor!uunet!husc6!mailrus!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!hpsal2!morrell From: morrell@hpsal2.HP.COM (Michael Morrell) Newsgroups: comp.unix.wizards Subject: Re: Kernel Hacks & Weird Filenames Message-ID: <2630003@hpsal2.HP.COM> Date: 4 May 88 23:21:59 GMT References: <13041@brl-adm.ARPA> Organization: HP System Architecture Lab, Cupertino Lines: 25 / hpsal2:comp.unix.wizards / jc@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