File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Number Format problem

 
Yaddif Medina
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a problem with my web application in Linux (White Box 4). The DecimalFormat that I am using does not take into account the "regional setting". The linux have the numeric format as : "12,123,123.45" (which I wanted), but when I executed the following sentence it returns "12.123.123,45" !!!.

java.text.NumberFormat df=java.text.DecimalFormat.getCurrencyInstance(java.util.Locale.US);

How can I force to the right format? it is not supposed to be taken from the operating system?.

PS. If I run my application in a windows server it works fine.

Thanks in advance.

Yaddif
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why you're getting the results you're getting. You could try specifically setting the DecimalFormatSymbols to the US Locale.

[ March 18, 2006: Message edited by: Garrett Rowe ]
 
Yaddif Medina
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that I am running Jasper Report for my application and it is not formating the number as the "regional setting" ... are there some "global" java parameter to do this?

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic