From owner-freebsd-arch Fri Nov 2 22:22:30 2001 Delivered-To: freebsd-arch@freebsd.org Received: from buffoon.automagic.org (buffoon.automagic.org [208.185.30.208]) by hub.freebsd.org (Postfix) with SMTP id E104E37B408 for ; Fri, 2 Nov 2001 22:22:27 -0800 (PST) Received: (qmail 67796 invoked by uid 1000); 3 Nov 2001 06:22:27 -0000 Date: Sat, 3 Nov 2001 01:22:27 -0500 From: Joe Abley To: Dag-Erling Smorgrav Cc: arch@freebsd.org Subject: Re: POSIX character class support for 1Tawk Message-ID: <20011103012226.Q25226@buffoon.automagic.org> References: <20011102233831.L25226@buffoon.automagic.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i 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 On Sat, Nov 03, 2001 at 06:16:44AM +0100, Dag-Erling Smorgrav wrote: > Joe Abley writes: > > On Sat, Nov 03, 2001 at 03:21:50AM +0100, Dag-Erling Smorgrav wrote: > > > See attached patch (which I've also submitted to bwk). > > Shouldn't the character classes used depend on the locale? > > Yes, but 1Tawk doesn't support locales at all, and in any case there > is no (simple and portable) way to obtain an enumeration of the > characters comprised in a particular character class (finding and > reading the locale definition file is neither simple nor portable). From a (very) brief inspection, it looks like gawk performs checks against [:alpha:] by calling isalpha(). That suggests that if libc on the platform in question happens to support a locale- sensitive isalpha(), then it will be inherited by gawk. Our isalpha() and friends are locale-sensitive, I think. This approach could be taken with bawk to provide locale-sensitive character classes without explicit demands on a locale API. I don't know much about about locales, though, so this could all be just so much crack-addled nonsense. Apologies if so. Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message