From owner-freebsd-hackers Mon Oct 16 13:46:54 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA20548 for hackers-outgoing; Mon, 16 Oct 1995 13:46:54 -0700 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id NAA20542 for ; Mon, 16 Oct 1995 13:46:49 -0700 Received: by sequent.kiae.su id AA17567 (5.65.kiae-2 ); Tue, 17 Oct 1995 00:39:58 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Tue, 17 Oct 95 00:39:56 +0300 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.11/8.6.9) id XAA00421; Mon, 16 Jan 1995 23:38:27 +0300 To: Terry Lambert Cc: hackers@freefall.freebsd.org, joerg_wunsch@uriah.heep.sax.de, kaleb@x.org References: <199510162007.NAA25234@phaeton.artisoft.com> In-Reply-To: <199510162007.NAA25234@phaeton.artisoft.com>; from Terry Lambert at Mon, 16 Oct 1995 13:07:18 -0700 (MST) Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 16 Jan 1995 23:38:26 +0300 (MSK) X-Mailer: Mail/@ [v2.40 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) X-Class: Fast Subject: Re: A couple problems in FreeBSD 2.1.0-950922-SNAP Lines: 49 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2322 Sender: owner-hackers@FreeBSD.org Precedence: bulk In message <199510162007.NAA25234@phaeton.artisoft.com> Terry Lambert writes: >> >IMHO, the base utilities that use 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