Skip site navigation (1)Skip section navigation (2)
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?= <ache@nagual.ru>
To:        David Nugent <davidn@sdev.usn.blaze.net.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Confused about locale
Message-ID:  <Pine.BSF.3.95.961221182006.627A-100000@nagual.ru>
In-Reply-To: <Mutt.19961222014909.davidn@sdev.blaze.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<ache@nagual.ru>
http://www.nagual.ru/~ache/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961221182006.627A-100000>