Unexpected behavior of NSNumberFormatter
Unexpected behavior of NSNumberFormatter
- Subject: Unexpected behavior of NSNumberFormatter
- From: Nick Müller <email@hidden>
- Date: Thu, 27 Dec 2001 21:02:48 +0100
Hi,
I'm fiddling around with NSNumberFormatter and don't get what the
documentation seems to promise.
I allocate a NSNumberFormatter, set him to localized and still get the
separators of the default.
// ----
NSNumberFormatter *fmt = [[NSNumbrFormatter alloc] init];
NSLog([fmt decimalSeparator]); // -> "." OK, this is the US-default
[fmt setLocalizesFormat:YES];
NSLog([fmt decimalSeparator]); // -> "." should be "," for DE
// ----
What's the right formatter for Numbers that responds to local/non-local
settings? I need one that can be modified.
BTW:
current DevTools, current OS.
TIA,
Nick