Why no non-latin TODIGIT mappings in UTF-8.src ?

Andrey Chernov ache at freebsd.org
Mon May 28 11:52:54 UTC 2007


On Mon, May 28, 2007 at 10:46:59AM +0200, Wolfgang Zenker wrote:
> Looking at our UTF-8.src, I see
> 
> $ grep DIGIT UTF-8.src
> DIGIT     '0' - '9'
> XDIGIT    '0' - '9'  'A' - 'F'  'a' - 'f'
> TODIGIT   < '0' - '9' : 0x0000 >
> TODIGIT   < 'A' - 'F' : 10 > < 'a' - 'f' : 10 >
> 
> It appears to me that isdigit() behaviour is controlled by the DIGIT
> keyword, not TODIGIT. However, I do admit that I don't understand completely
> how locale files are supposed to work. So where does e.g. iswdigit() get
> its character class information from, should that not be in the locale
> information as well somewhere?

There is no POSIX function to extract TODIGIT info, so it is useless for 
now.
todigit() is SCO extension and its manpage says:
The macro todigit returns the digit character corresponding to its integer 
argument. The argument must be in the range 0-9, otherwise the behavior is 
undefined.
iswdigit() have the same 0-9 restriction as isdigit() just accepts wint_t

-- 
http://ache.pp.ru/


More information about the freebsd-i18n mailing list