• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unexpected behavior of NSNumberFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Unexpected behavior of NSNumberFormatter
      • From: Chris Kane <email@hidden>
  • Prev by Date: Re: CFNetwork?
  • Next by Date: Turning off Text Wrapping in NSTextView
  • Previous by thread: Re: Can I use AGL functions with NSOpenGLContext ?
  • Next by thread: Re: Unexpected behavior of NSNumberFormatter
  • Index(es):
    • Date
    • Thread