From owner-freebsd-current Sat Dec 21 08:02:43 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id IAA14793 for current-outgoing; Sat, 21 Dec 1996 08:02:43 -0800 (PST) Received: from sovcom.kiae.su (sovcom.kiae.su [193.125.152.1]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id IAA14782 for ; Sat, 21 Dec 1996 08:02:39 -0800 (PST) Received: by sovcom.kiae.su id AA08941 (5.65.kiae-1 ); Sat, 21 Dec 1996 18:43:33 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Sat, 21 Dec 96 18:43:32 +0300 Received: from localhost (nagual.ru [127.0.0.1]) by nagual.ru (8.8.4/8.8.4) with SMTP id SAA00647; Sat, 21 Dec 1996 18:30:16 +0300 (MSK) Date: Sat, 21 Dec 1996 18:30:16 +0300 (MSK) From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7=2C_Andrey_Chernov?= To: David Nugent Cc: freebsd-current@freebsd.org Subject: Re: Confused about locale In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sun, 22 Dec 1996, David Nugent wrote: > On the subject of locale, in an email discussion Joerg and I were > having a couple of weeks back, the idea of a "system default" > locale was raised (which, currently, FreeBSD does not have). > I thought a simple solution may be a symlink or two in /etc > (eg. /etc/LANG and /etc/NLS) pointing to the correct location > under /usr/share/locale and /usr/share/nls may be the easiest > way this could be implemented. These may be overridden by using > the appropriate environment variables, but are the default > when none is set (unlike now, where 'ascii' and 'C' are always > the default). About proposed implementation: /etc/LANG breaks POSIX. POSIX describes behaviour with and without environment variables exactly and specify default as "C" without env. variables, so env. variables must exists in any case. Moreover some shell scripts (nroff f.e.) especially test for certain locale env. variables presence, so no /etc/* things, env. variables only. About idea: I dislike idea of "system default" locale, I like idea of "user default" locale instead! It is no purpose to keep "system default" locale, all daemons must run at standard "C" locale. Basically you can have users from several countries in your system or maybe one country users with different tastes. There is bad thing to force them to "system default" locale. Of course, you can override that by "user default" locale, but I don't see a reason to keep "system default" locale in this case too. There must be some field into passwd which indicates current user startup locale which must be changeable by user via chpass. You can set default user locale in adduser or pw command to match majority of users on your machine. Login set LANG and MM_CHARSET env. variables according to passwd field. > I haven't yet looked into what changes may be involved, but > they should be small and confined entirely (afaik) to libc. It is a very big mistake to run daemons with any locale != "C", some of them can even call setlocale(...,"") or check "LANG", etc variables, X11 f.e. -- Andrey A. Chernov http://www.nagual.ru/~ache/