From owner-freebsd-hackers Mon Oct 16 02:44:27 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA02711 for hackers-outgoing; Mon, 16 Oct 1995 02:44:27 -0700 Received: from sovcom.kiae.su (sovcom.kiae.su [144.206.136.1]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id CAA02706 for ; Mon, 16 Oct 1995 02:43:59 -0700 Received: by sovcom.kiae.su id AA09528 (5.65.kiae-1 ); Mon, 16 Oct 1995 12:36:53 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Mon, 16 Oct 95 12:36:53 +0300 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.11/8.6.9) id MAA04880; Mon, 16 Oct 1995 12:34:15 +0300 To: FreeBSD hackers , Joerg Wunsch References: <199510160744.IAA24308@uriah.heep.sax.de> In-Reply-To: <199510160744.IAA24308@uriah.heep.sax.de>; from J Wunsch at Mon, 16 Oct 1995 08:44:04 +0100 (MET) Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 16 Oct 1995 12:34:15 +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: 41 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1706 Sender: owner-hackers@FreeBSD.ORG Precedence: bulk In message <199510160744.IAA24308@uriah.heep.sax.de> J Wunsch writes: >As =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= wrote: >> >> >You misunderstood me. I was thinking of an explicit setlocale() >> >inside all system utilities (except daemons) that use . >> >> 1) Too match sources will be changed cause troubles with patches >> and upgrades. >That doesn't count. The base utilities aren't being upgraded that >often. And all ports utilities need to be upgraded too... >> 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. >Ah, i didn't knew that our locale support ain't complete yet. I was >under the impression that the LC_CTYPE part was already ok. LC_CTYPE part _is_ already ok and because of it 'ls' with setlocale() from main() for Japanese LANG becomes broken right now. I repeat one again: 1) setlocale() is aware of multi-byte LANGs. 2) ls and other utilities not aware of multi-byte LANGs and becomes very broken because assumes that char type == char. 1) and 2) isn't purposes to not have correct ctype for ls if your charset is <= 8bit. My hack do it. For multi-byte LANGs ls and others stays to ASCII in my hack and don't becomes broken. -- 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