Date: Mon, 28 May 2007 15:52:50 +0400 From: Andrey Chernov <ache@freebsd.org> To: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org> Cc: freebsd-i18n@freebsd.org Subject: Re: Why no non-latin TODIGIT mappings in UTF-8.src ? Message-ID: <20070528115250.GA24812@nagual.pp.ru> In-Reply-To: <20070528084659.GA77240@lyxys.ka.sub.org> References: <200705272241.l4RMfg07051300@juno.lyxys.ka.sub.org> <20070528072847.GA18850@nagual.pp.ru> <20070528084659.GA77240@lyxys.ka.sub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070528115250.GA24812>