Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Kernel Hacks & Weird Filenames Message-ID: <52765@sun.uucp> Date: 11 May 88 00:09:46 GMT References: <13041@brl-adm.ARPA> <14020039@hpisod2.HP.COM> <326@augean.OZ> Sender: news@sun.uucp Lines: 28 > If done in the terminal driver, new stty options could be added to say > what characters are to be considered unprintable. This could break > some things which like to setup terminals by using "cat foo" where foo > is a file full of special characters It also breaks just about any program that uses "termcap", "terminfo", or "curses", unless all such programs turn off all at special processing. > I think modifying ls to display filenames with unprintable character > sets is a bit less tidy. Perhaps, although it's already been done both in the 4BSD "ls" and the S5R2 "ls". > Perhaps it could pick up a printable character set from an environment > variable. This functionality is specified by the current ANSI C drafts; you do setlocale(LC_CTYPE, ""); or setlocale(LC_ALL, ""); and themacros switch to using the appropriate locale's rules. According to the last POSIX draft, the appropriate locale can be specified by setting the LANG, LC_ALL, or LC_CTYPE environment variables.