From owner-freebsd-hackers Sun Oct 15 18:15:47 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id SAA21622 for hackers-outgoing; Sun, 15 Oct 1995 18:15:47 -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 SAA21616 for ; Sun, 15 Oct 1995 18:15:44 -0700 Received: by sequent.kiae.su id AA13174 (5.65.kiae-2 ); Mon, 16 Oct 1995 05:14:46 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Mon, 16 Oct 95 05:14:45 +0300 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.11/8.6.9) id EAA01277; Mon, 16 Oct 1995 04:13:55 +0300 To: "Kaleb S. KEITHLEY" Cc: hackers@freefall.FreeBSD.org References: <199510160100.VAA06828@exalt.x.org> In-Reply-To: <199510160100.VAA06828@exalt.x.org>; from "Kaleb S. KEITHLEY" at Sun, 15 Oct 1995 21:00:27 EST Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 16 Oct 1995 04:13:55 +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: 54 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2404 Sender: owner-hackers@FreeBSD.org Precedence: bulk In message <199510160100.VAA06828@exalt.x.org> Kaleb S. KEITHLEY writes: >> Historycally ctype(>127) returns 0 in many systems that I see, >Every day that goes by there are fewer and fewer people using those >systems. Just because the U.S.-centric computer industry used to have >tunnel vision when it came to i18n doesn't mean that "modern" systems >should perpetuate the same mistakes into the future, especially when >there's no reason not to fix it. I agree. But disagree of your default touching. POSIX says that "C" locale must be strict ASCII. >> If you want 8859-1, just use proper locale. >A nice suggestion. Too bad it doesn't work. ANSI/POSIX1 say that a >program does the equivalent of setlocale(LC_ALL, "C") on startup. Given >that ls, and I gather everything else, disregard my LANG, LC_ALL, and >LC_CTYPE environment variables, I'm left wondering how it is you think >that using the "proper locale" will help. Are you assuming that I'm >using the undocumented hack of setting the ENABLE_STARTUP_LOCALE >environment variable? Yes, for FreeBSD I assume this. Some other systems, like Xenix with international support and some Sun's locale variants call setlocale() from crt0 without additional asking. Basically you must cleanup your ctype-oriented program to work with multi-byte chars before inserting setlocale() call into main(). Don't forget: ctype famaly works with multi-byte chars too. If you simple insert setlocale in 'ls' f.e. it becomes very broken for Japanese chars f.e. because it assumed that char type == char everywhere. My strategy allows to 'ls' stays to ASCII when LANG sets to Japanese. If 'ls' stays to 8859-1 as you suggest, it overwrites chars in Japanese environment! >> >>>fixes some bugs in mklocale's lt_LN LC_CTYPE template. >> >> >>BLANK fixes are incorrect, see isblank(3). >> >As I said, at least one system's docs claim it spec'd in ISO8859-1. I >don't have an ISO8859-1 at hand, and I'm not even sure I have one at >work, although I must, somewhere. I don't need 8859-1 docs, I already have them. I need any isblank() references. Maybe ANSI? -- 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