Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2001 01:22:27 -0500
From:      Joe Abley <jabley@automagic.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        arch@freebsd.org
Subject:   Re: POSIX character class support for 1Tawk
Message-ID:  <20011103012226.Q25226@buffoon.automagic.org>
In-Reply-To: <xzphesca0xv.fsf@flood.ping.uio.no>
References:  <xzpu1wca91d.fsf@flood.ping.uio.no> <20011102233831.L25226@buffoon.automagic.org> <xzphesca0xv.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 03, 2001 at 06:16:44AM +0100, Dag-Erling Smorgrav wrote:
> Joe Abley <jabley@automagic.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011103012226.Q25226>