For that hypothetical Venusian locale, as discussed for 1078, it would be 
expected to define a VDIGIT (sic) custom LC_CTYPE charclass for specifying 
other character names representing digits, and then using [[:digit:][:VDIGIT:]] 
to test for both. Code like this couldn't be considered strictly conforming, 
but might qualify for NLS-conforming. Also, application-specific locales can 
add names to a digit definition, with the same caveat, and then [:digit:] would 
be different from [0-9]. Similarly, VDIGIT could include [0-9] plus other 
names, and then code would only need to use [:VDIGIT:] to test for both.


In a message dated 5/15/2018 4:55:20 PM Eastern Standard Time, 
stephane.chaze...@gmail.com writes:

 
2018-05-15 13:38:15 -0500, Eric Blake:

> On 05/15/2018 12:50 PM, Stephane Chazelas wrote:
[...]
> >> digit
> >> Define the characters to be classified as numeric digits.
> >>
> >> In the POSIX locale, only:
> >>
> >>0 1 2 3 4 5 6 7 8 9
> 
> Please read http://austingroupbugs.net/view.php?id=1078 where this wording
> has been tightened to cover ALL locales, not just the POSIX locale, to
> better match with C requirements on isdigit().
[...]

Thanks.

I somehow missed that one.

Does that mean that [0-9] is also guaranteed to match on
0123456789 only? And that then [[:digit:]] in regexp/fnmatch is
close to useless as it's longer than [0-9] and is a bit
misleading as it suggests it would be affected by localisation
(like the other character classes) while it's not.

-- 
Stephane

Reply via email to