On Thu, 21 Sep 2000, Marcin 'Qrczak' Kowalczyk wrote:
> > I disagree with the isDigit case, simply because my main language,
> > Persian, uses alternate digits when written.
> Do they form numbers in the same way as ASCII digits?
Yes. The rules are exactly the same.
> Does Unicode character database provide a way to tell which digits
> form numbers in this way (decimal, "big Endian")?
General Category = Nd means decimal digit. I think it's always big-endian.
> Do you think that they (and digits from other languages) should
> be recognized as numbers in sources for programming languages that
> generally accept foreign letters in identifiers? (I don't know what
> Haskell gurus would say for that.)
I'm not in a position to recommend for or against them in program sources,
but they should be accepted as number forms for manual data entry.
> What about isOctDigit and isHexDigit?
Persian tradition uses European digits for Hexadecimal numbers, but for
Octal, Persian digit forms are sometimes used.
> Haskell provides digitToInt and intToDigit which currently deal with
> ASCII digits and hexadecimal "digits" A..F a..f. If isDigit accepted
> foreign digits, it would make sense to extend digitToInt to convert
> them too. But obviously not intToDigit.
intToDigit should look at the locale to select the preferred digit form,
This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:13 EDT