FROM : Sean McBride
DATE : Sat Dec 11 18:57:16 2004
Mark Dawson (<email_removed>) on Mon, Dec 6, 2004 5:20 PM said:
>I've seen code to create a set of valid characters:
>
>NSCharacterSet *disallowedCharacters = [[NSCharacterSet
>characterSetWithCharactersInString:@"0123456789.'"] invertedSet];
Also take a look at NSCharacterSet's decimalDigitCharacterSet method.
>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.
There are other variations. There are also variations of the thousands
separators. For example, the number 10000 would be written "10.000" in
Argentina, "10 000" in Canada, "10,000" in USA, etc. Be careful what you
assume, it's tricky. :(
--
____________________________________________________________
Sean McBride, B. Eng <email_removed>
Mac Software Designer Montréal, Québec, Canada
DATE : Sat Dec 11 18:57:16 2004
Mark Dawson (<email_removed>) on Mon, Dec 6, 2004 5:20 PM said:
>I've seen code to create a set of valid characters:
>
>NSCharacterSet *disallowedCharacters = [[NSCharacterSet
>characterSetWithCharactersInString:@"0123456789.'"] invertedSet];
Also take a look at NSCharacterSet's decimalDigitCharacterSet method.
>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.
There are other variations. There are also variations of the thousands
separators. For example, the number 10000 would be written "10.000" in
Argentina, "10 000" in Canada, "10,000" in USA, etc. Be careful what you
assume, it's tricky. :(
--
____________________________________________________________
Sean McBride, B. Eng <email_removed>
Mac Software Designer Montréal, Québec, Canada
| Related mails | Author | Date |
|---|---|---|
| Mark Dawson | Dec 6, 23:20 | |
| R. Scott Thompson | Dec 6, 23:32 | |
| Ken Ferry | Dec 7, 00:38 | |
| M. Uli Kusterer | Dec 7, 04:36 | |
| Sean McBride | Dec 11, 18:57 |






Cocoa mail archive

