From owner-freebsd-hackers Tue Oct 17 04:32:53 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id EAA23303 for hackers-outgoing; Tue, 17 Oct 1995 04:32:53 -0700 Received: from yarrina.connect.com.au (yarrina.connect.com.au [192.189.54.17]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id EAA23295 for ; Tue, 17 Oct 1995 04:32:28 -0700 Received: (from root@localhost) by yarrina.connect.com.au with UUCP id VAA13864 (8.6.12/IDA-1.6 for hackers@freefall.freebsd.org); Tue, 17 Oct 1995 21:32:17 +1000 Received: from localhost.nemeton.com.au (giles@localhost.nemeton.com.au [127.0.0.1]) by nemeton.com.au (8.6.9/8.6.9) with SMTP id VAA09333 for ; Tue, 17 Oct 1995 21:15:17 +1000 Message-Id: <199510171115.VAA09333@nemeton.com.au> Subject: Re: A couple problems in FreeBSD 2.1.0-950922-SNAP In-reply-to: Date: Tue, 17 Oct 1995 21:15:16 +1000 From: Giles Lean Apparently-To: hackers@freefall.freebsd.org Sender: owner-hackers@FreeBSD.org Precedence: bulk On Mon, 16 Jan 1995 23:38:26 +0300 (MSK) =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= wrote: > It is very bad karma to call setlocale from main for ctype-oriented > programs when chars size assumed <= 8bit. > Only crt0 is proper place for this things. crt0 is ABSOLUTELY NOT the place to try to "fix" this. The fix as Terry has explained very politely and in considerable detail is to localise individual programs. Blindly plugging in setlocale() is bad whether you plug it into main() or into crt0. Breaking ANSI and ISO standards conformance by plugging it into crt0 is just a bonus. :-( If there was a good easy solution to I18N don't you think *someone* in the standards groups would have pushed it? Or some proprietary system would have just *done* it, whether it was standard or not. This kludge would only be excusable if it *always* worked. If it works sometimes and you want to do it on your system, fine, but don't inflict it on the entire FreeBSD community. Fortunately the 'right' (standards conformant, clean-ish) solution can be implemented gradually. Further there is strong motivation for programs like editors and mailers to be localised and some programs like xterm are localised already. Since someone mentioned NetBSD I'll mention that it has very limited locale support so far, basically limited to the C locale and a couple or three non-English message catalogs. Giles