Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 18:57:17 +1000
From:      Tim Robbins <tjr@freebsd.org>
To:        Andrey Chernov <ache@nagual.pp.ru>, src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/locale isdigit.3 isxdigit.3
Message-ID:  <20040330085717.GA49670@cat.robbins.dropbear.id.au>
In-Reply-To: <20040330082936.GA43805@nagual.pp.ru>
References:  <200403300702.i2U724nk010851@repoman.freebsd.org> <20040330082936.GA43805@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 30, 2004 at 12:29:36PM +0400, Andrey Chernov wrote:

> On Mon, Mar 29, 2004 at 11:02:04PM -0800, Tim J. Robbins wrote:
> >   Document the isnumber() and ishexnumber() functions, and explain how they
> >   differ (at least in theory) from isdigit() and isxdigit().
> 
> Currently we don't support number != digit flag in our mklocale(1) format.
> I think it worth to mention this fact in the BUGS section (short term 
> solution) or add such flag (long term one).

My understanding is that we do have support for this in an obscure way:
isdigit() doesn't use the LC_CTYPE data file at all, and always returns
results from the C/POSIX locale (_DefaultRuneLocale). isnumber() uses
the current locale (_CurrentRuneLocale). So anything listed in the
LC_CTYPE file as DIGIT will only affect isnumber(), not isdigit().
I don't know whether this was an intended feature or not.

But you're right - I'll add something to the manual page about the
number != digit limitation.


Tim



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