From owner-freebsd-current Mon Oct 16 02:02:37 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA01383 for current-outgoing; Mon, 16 Oct 1995 02:02:37 -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 CAA01358 for ; Mon, 16 Oct 1995 02:02:23 -0700 Received: by sequent.kiae.su id AA28935 (5.65.kiae-2 ); Mon, 16 Oct 1995 12:46:17 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Mon, 16 Oct 95 12:46:16 +0400 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.11/8.6.9) id LAA02051; Mon, 16 Oct 1995 11:35:22 +0300 To: Joerg Wunsch Cc: current@FreeBSD.ORG References: <199510160807.JAA24523@uriah.heep.sax.de> In-Reply-To: <199510160807.JAA24523@uriah.heep.sax.de>; from J Wunsch at Mon, 16 Oct 1995 09:07:41 +0100 (MET) Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 16 Oct 1995 11:35:22 +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: I plan to change ENABLE_STARTUP_LOCALE behaviour... Lines: 46 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2008 Sender: owner-current@FreeBSD.ORG Precedence: bulk In message <199510160807.JAA24523@uriah.heep.sax.de> J Wunsch writes: >As =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= wrote: >> >> I plan to make ENABLE_STARTUP_LOCALE as *default* case >> and introduce new variable DISABLE_STARTUP_LOCALE >> to disable thins thing (for debugging purposes f.e.). >I'm against it. You wrote: >3) It is useful only for <=8bit locales, so you can't call setlocale, >multichars becomes damaged, you need to call reduced to 8bit >setlocale version as done in crt0. >4) Using non-standard (non-POSIX/ANSI/etc) reduced setlocale in >all sources cause portability problems. >So either this is broken, and we cannot make it the default, or we >should really put a ``setlocale(LC_CTYPE, "");'' on top of all system >utilities that use functions. This is effectively the same >as your crt0.o hack, but then it's obvious that it's part of the >program. >Right now, part of the utilities does the right thing (e.g. "vi"), and >most others don't. Really, I don't understand, how 3) and 4) related anyhow to my proposal. 'Broken' is result of your intention to put 'setlocale' call to all main()s. It is broken because of 3). If you change it to call used in crt0, it will be broken because of 4). In my case: 1) I don't put anything non-standard into main(). (crt0 already full of non-standard things). 2) I do right thing when LANG not set or set to "C" (ASCII per POSIX). 3) I do right thing for >8bit charsets (ASCII per POSIX). 4) I do right thing for pgms wich calls setlocale by itself like vi. 5) It is more easy to users and don't involve explanation each time. (I am already tired to say "setenv ENABLE_STARTUP_LOCALE" on each "fix" comes to -hackers list). -- 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