Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.HP.COM (Dave Decot) Newsgroups: comp.unix.wizards Subject: Re: Kernel Hacks & Weird Filenames Message-ID: <14020035@hpisod2.HP.COM> Date: 21 Apr 88 22:41:02 GMT References: <13041@brl-adm.ARPA> Organization: Hewlett Packard, Cupertino Lines: 53 Several of you have expressed the objection "What if I REALLY wanted to create filenames with funny characters? The system won't let me do what I want! CENSORSHIP!!" Well, maybe not quite like that... :-) More like... > So should the Unix kernel make the (relatively) irrevocable decision > to disallow locally-non-printing characters? Maybe---but I doubt it. However, note that I originally suggested that it be configurable (possibly per-filesystem) and that the default should be "no-funnies": > ->Why don't we bite the bullet and change our kernels to refuse > ->to create files whose names begin with a hyphen or contain > ->non-printing characters (unless special arrangements are made > ->by the user to permit it)? > 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. There are already multibyte character sets (e.g., Taiwanese) for which the representations of some characters contain an ASCII '/' as the second byte. Some sort of kernel hack configurable for different languages is necessary already. Different terminals is another matter; I don't think it should depend on the terminals, only the information about the character set being used (such as what characters are letters, numeric, punctuation, printable, etc.). I would think that most UNIX users would want their filenames to be portable. > 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@chinet.UUCP>', which is by no means a convenient handle. Certainly isn't. There are now much better ways to do file locking than with those blasted lock files. > 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 `..'). And with `-' ! This seems like a somewhat strange way to name temporary files, but if you want to do that, what's wrong with radix 93 (i.e., only printable characters without - and / and probably space)? Dave Decot hpda!decot