From owner-freebsd-arch Sat Nov 3 13:39:37 2001 Delivered-To: freebsd-arch@freebsd.org Received: from smtp.noos.fr (zola.noos.net [212.198.2.76]) by hub.freebsd.org (Postfix) with ESMTP id 3382237B417 for ; Sat, 3 Nov 2001 13:39:34 -0800 (PST) Received: (qmail 15288777 invoked by uid 0); 3 Nov 2001 21:39:32 -0000 Received: from unknown (HELO gits.dyndns.org) ([212.198.229.145]) (envelope-sender ) by 212.198.2.76 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 3 Nov 2001 21:39:32 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.6/8.11.6) id fA3LdPt07724; Sat, 3 Nov 2001 22:39:25 +0100 (CET) (envelope-from root) Message-Id: <200111032139.fA3LdPt07724@gits.dyndns.org> Subject: Re: POSIX character class support for 1Tawk In-Reply-To: <20011103172654.F3551@straylight.oblivion.bg> To: Peter Pentchev Date: Sat, 3 Nov 2001 22:39:25 +0100 (CET) Cc: Giorgos Keramidas , Dag-Erling Smorgrav , arch@FreeBSD.ORG Reply-To: clefevre@citeweb.net From: Cyrille Lefevre Organization: ACME X-Face: X-Mailer: ELM [version 2.4ME+ PL95a (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Pentchev wrote: > On Sat, Nov 03, 2001 at 04:11:34PM +0100, Cyrille Lefevre wrote: > > Giorgos Keramidas wrote: > > > On Sat, Nov 03, 2001 at 04:49:33PM +0200, Peter Pentchev wrote: > > > > On Sat, Nov 03, 2001 at 02:35:15PM +0000, Giorgos Keramidas wrote: > > > > [snip] > > > > > $ env LC_LANG=el_GR LC_ALL=el_GR.ISO8859-7 ./blah > > > > > Using NULL: false > > > > > Using getenv(): true > > > > > > > > > > In the second case, of having the proper locale setup in the > > > > > environment, only when getenv() is used to retrieve the proper value > > > > > for setlocale() the GREEK_ALPHA character is recognized from isalpha() :/ > > > > > > > > Well, I implicitly assumed that LC_ALL was set, as by the FreeBSD sample > > > > 'russian' login.conf entry: it defines the 'lang' attribute, which > > > > sets LANG, which setlocale(3) interprets as an LC_ALL setting. > > > > > > Aye, my mistake. > > > With proper defaults, and "", this works. > > > You are right :) > > > > I suppose this only work under -current, I am right ? > > Um.. no. The 'russian' login class is in -stable, and I've been > using a suitably modified 'bulgarian' login class for the past > six months. so, why the posted program always returns false ? $ uname -a FreeBSD gits 4.4-STABLE FreeBSD 4.4-STABLE #9: Sun Oct 21 22:55:26 CEST 2001 root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM i386 $ env LANG=el_GR.ISO8859-7 LC_ALL=el_GR.ISO8859-7 ./blah Using NULL: false Using getenv(): false PS : I've changed setlocale(LC_ALL, NULL) to setlocale(LC_ALL, ""). Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message