File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes UK Locale problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "UK Locale problem" Watch "UK Locale problem" New topic
Author

UK Locale problem

Steve Wood
Ranch Hand

Joined: Jan 08, 2003
Posts: 137
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

Joined: Jul 06, 2005
Posts: 1018
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

Joined: Jan 10, 2002
Posts: 61187
    
  66

Nothing to do with JSP, so off to the Java in General (intermediate) forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UK Locale problem