Why no non-latin TODIGIT mappings in UTF-8.src ?
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
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
iswdigit() have the same 0-9 restriction as isdigit() just accepts wint_t
More information about the freebsd-i18n