• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UK Locale problem

 
Steve Wood
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Our server has the following configuration:

LANG=en_GB.ISO8859-15
LC_CTYPE="en_GB"
LC_NUMERIC="en_GB"
LC_TIME="en_GB"
LC_COLLATE="en_GB"
LC_MONETARY="en_GB"
LC_MESSAGES="en_GB"
LC_ALL=en_GB

But when we call this:

Currency.getInstance(Locale.getDefault());

We get this:

java.lang.IllegalArgumentException at java.util.Currency.getInstance(Currency.java:241)

Any ideas?

Any help is much appreciated.

Cheers,

Steve
 
Stefan Evans
Bartender
Pie
Posts: 1670
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Currency.getInstance() method throws a IllegalArgumentException - if the country of the given locale is not a supported ISO 3166 country code

What is the default Locale for the machine you are running?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with JSP, so off to the Java in General (intermediate) forum.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic