• 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
bug or feature in NSNumberFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug or feature in NSNumberFormatter


  • Subject: bug or feature in NSNumberFormatter
  • From: Michael Schmiedgen <email@hidden>
  • Date: Thu, 17 Jun 2010 19:29:47 +0200

Hi list,

I get strange behaviour if and only if formatting the
value of zero. Am I something missing? Or what is the
point here?

-----

NSNumberFormatter nf = new NSNumberFormatter("__0.00");

nf.setLocalizesPattern(true);
nf.format(new Integer(0)); // formatted number is '0'

nf.setLocalizesPattern(false);
nf.format(new Integer(0)); // formatted number is '  0.00'

-----

The correct behaviour should be '  0.00', or shouldnt it?
I Have tried various Locales, but it behaves strange all
the time.

If it is a bug, is it possible to fix this in ERXNumberFormatter?

Cheers :)
  Michael

--
 Michael Schmiedgen, BSc

 Takwa GmbH
 Friedrich-List-Str. 36
 99096 Erfurt GERMANY

 Tel  +49 361 6534096
 Fax  +49 361 6534097
 Mail email@hidden
 Web  http://www.takwa.de/

 Geschaeftsfuehrung: Ingo Buchholz
 HRB 112964, Amtsgericht Jena
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: bug or feature in NSNumberFormatter
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: .wo template parsing problem with xml-tag named "workingpr"
  • Next by Date: Re: deployment on tomcat
  • Previous by thread: Re: deployment on tomcat
  • Next by thread: Re: bug or feature in NSNumberFormatter
  • Index(es):
    • Date
    • Thread