On Jun 14, 2007, at 3:19 PM, Deborah Goldsmith wrote:
On Jun 6, 2007, at 6:23 PM, Laurence Harris wrote:
I just don't want to call std::isdigit() and miss other
language's number systems.
You'll be getting Unicode text. Unless you plan to support non-
Arabic numbers it doesn't matter what language the user is using
because every character in Unicode has the same code point
independent of language. I'm pretty sure Mac OS X has no support
for converting non-Arabic numeric text into numbers, and Arabic
are the standard for use with computers, so language won't be an
issue.
Well, no. non-ASCII digits are used in several locales supported by
Mac OS X, most notably the Arabic and Indic languages (try it in
International Preferences). There are scads of non-ASCII digits in
Unicode.
But aren't most of those non-ASCII digits still Arabic numbers? Don't
most people -- even in other languages -- enter numbers in text
fields as ASCII digits? Just wondering.
As Philip Aker mentioned, CFCharacterSet can determine if something
is a Unicode decimal digit.
Knowing it's a digit is not enough. You need to be able to convert a
string of digits (ASCII or otherwise) into a numeric value. Does Mac
OS X provide mechanisms for doing that with textual representations
of numbers composed of arbitrary Unicode decimal digits?
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden