This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Handling numbers input/output in glibc
- From: Behdad Esfahbod <behdad at cs dot toronto dot edu>
- To: Bruno Haible <bruno at clisp dot org>
- Cc: Roozbeh Pournader <roozbeh at sharif dot edu>, hamed at bamdad dot org,libc-alpha at sources dot redhat dot com
- Date: Tue, 27 Jan 2004 03:45:02 -0500
- Subject: Re: Handling numbers input/output in glibc
- References: <200401221336.56034.bruno@clisp.org> <Pine.LNX.4.58.0401270317070.30856@epoch.cs>
Please ignore my last mail. It definitely means that only ASCII
digits are decimal digits.
Sorry for the extra noise,
behdad
On Tue, 27 Jan 2004, Behdad Esfahbod wrote:
> On Thu, 22 Jan 2004, Bruno Haible wrote:
>
> > Behdad Esfahbod wrote:
> > > Does it mean the same about iswdigit()?
> >
> > Yes. The ISO C 99 description of iswdigit(), section 7.25.2.1.5, is:
> >
> > "The iswdigit function tests for any wide character that corresponds to
> > a decimal-digit character (as defined in 5.2.1)."
> >
> > See also the comment in glibc/localedata/gen-unicode-ctype.c function
> > is_digit().
> >
> > Bruno
>
> Thanks Bruno for the reply. The comment in gen-unicode-ctype.c
> quotes the same part from C99 and this part:
>
> 5.2.1:
> the 10 decimal digits 0 1 2 3 4 5 6 7 8 9
>
> But as I wrote in my original long mail, I think this is a
> misunderstanding. Please read these two clauses:
>
> """
> 5.2.1 Character sets
>
> 1 Two sets of characters and their associated collating
> sequences shall be defined: the set in which source files are
> written (the source character set), and the set interpreted in
> the execution environment (the execution character set). Each
> set is further divided into a basic character set, whose contents
> are given by this subclause, and a set of zero or more
> locale-specific members (which are not members of the basic
> character set) called extended characters. The combined set is
> also called extended character set. The calues of the members of
> the execution character set are implementation-defined.
>
> 3 Both the basic source and basic execution character sets shall
> have the following members: the 26 uppercase letters of the Latin
> alphabet ..., the 26 lowercase letters of the Latin alphabet ...,
> the 10 decimal digits ..., the following 29 graphic characters
> ....
> """
>
> So I mean, I don't really say this clause is saying that only the
> ASCII digits should be recognized as decimal digits. These are
> the basic decimal digits, while extended ones are locale-specific.
> You may say it says '"the" decimal digits', and I have nothing
> more to say.
>
> Yours,
> behdad
>