Localized decimal point?
Localized decimal point?
- Subject: Localized decimal point?
- From: Mark Dawson <email@hidden>
- Date: Mon, 6 Dec 2004 14:20:46 -0800
I'm new to Cocoa, and haven't seen this quite asked:
I want to write a subclass of NSFormatter. One piece would validate the input (in isPartialStringValid). I want to allow decimal points--however, I also want this to be correct localizing-wise.
I've seen code to create a set of valid characters:
NSCharacterSet *disallowedCharacters = [[NSCharacterSet
characterSetWithCharactersInString:@"0123456789.'"] invertedSet];
However, the decimal point is a comma in Europe (i.e. 1/2 = 0.5 US 0,5 France?). I don't know if there are any other decimal point variations. So, in the US, I want to allow ',', while NOT allowing a ','; in a France allow/not allow the opposite.
How would I figure out what the current decimal point character is?
Thanks!
mark _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden