Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 1995 23:38:26 +0300 (MSK)
From:      =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) <ache@astral.msk.su>
To:        Terry Lambert <terry@lambert.org>
Cc:        hackers@freefall.freebsd.org, joerg_wunsch@uriah.heep.sax.de, kaleb@x.org
Subject:   Re: A couple problems in FreeBSD 2.1.0-950922-SNAP
Message-ID:  <lP2bj6l0P1@ache.dialup.demos.ru>
In-Reply-To: <199510162007.NAA25234@phaeton.artisoft.com>; from Terry Lambert at Mon, 16 Oct 1995 13:07:18 -0700 (MST)
References:  <199510162007.NAA25234@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199510162007.NAA25234@phaeton.artisoft.com> Terry Lambert
    writes:

>> >IMHO, the base utilities that use <ctype.h> should properly initialize
>> >the locale instead of relying on that hack.  (The hack is useful to
>> >force programs that don't like to handle locale's, but base utilities
>> >of the system are expected to do it right theirselves.)
>> 
>> I have nothing against reverting this variable to
>> DISABLE_STARTUP_LOCALE f.e. If you remember I plan to make startup locale
>> as default for all program, but some peoples disagree, so I introduce
>> ENABLE_STARTUP_LOCALE.

>I also thing that the crt0 is the *wrong* place to do the locale work,
>which really belongs as a call in main().

It seems that every new person appears immediately starts to says
the same wrong things as other starts instead of reading full
discussion first where all this stuff already explained several times.

It is very bad karma to call setlocale from main for ctype-oriented
programs when chars size assumed <= 8bit.
I already tries explain it to Joerg and if you really interested,
you can found answer in my previous messages.
Only crt0 is proper place for this things.

>It is wrong to "fix" broken use of a programming model by causing
>broken use of the startup model in it's place.

>Making this broken startup code implicit rather than explicit (by changing
>from a positive to a negative environment test) is just plain wrong.

Well, what you consider as 'broken' most of user expect to see as 'i18n'.
Why it is 'broken' to have right ctype at startup? Try to ask your
customers, almost every user which directly sets "LANG" assume that
'ls' f.e. must be affected immediately and _not_ by additional hidden magic
of 'setenv ENABLE_STARTUP_LOCALE'. If you don't want any startup code,
simple not set your "LANG".

Where was you when Kaleb suggest more uglier hack with default code
table propogating? My hack keeps right ctype in all cases
and his hack works only for 8859-1 and not works even for 8859-n,
n != 1.

-- 
Andrey A. Chernov        : And I rest so composedly,  /Now, in my bed,
ache@astral.msk.su       : That any beholder  /Might fancy me dead -
FidoNet: 2:5020/230.3    : Might start at beholding me,  /Thinking me dead.
RELCOM Team,FreeBSD Team :         E.A.Poe         From "For Annie" 1849



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lP2bj6l0P1>