• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Number Format problem

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic