• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Currency and JAVA

darmstadt

I live on CUK
Joined
Jul 6, 2005
Messages
20,014
Likes received
4,111
Thanks received
1,499
Location
The Eurozone
I thought I would quickly ask here before going too deep. I'm not a Java person and have a small problem with a system (this is WebSphere Portal running under Linux) where an application was deployed and for Germany the currency should look like:

1.234.56

but is showing:

1,234.56

I believe that somewhere there must be setting to change this to do with Java as on other systems it is okay (searching through settings on them now.) The only thing I can think of is that on one of the systems last week I changed the JVM to be UTF-8 deom ISO-8859-1 so that it would do all the ä, ö, ü, etc but I don't think that is what it is...
 
You can provide the JVM with a default language. That is,

java -Duser.language=de <other options>

However (as I experienced this week) it may screw with your Oracle JDBC driver as it will try to load configuration that expects the DB server to be in that language. Stupid Oracle :bang:
 
You can provide the JVM with a default language. That is,

java -Duser.language=de <other options>

However (as I experienced this week) it may screw with your Oracle JDBC driver as it will try to load configuration that expects the DB server to be in that language. Stupid Oracle :bang:

Thanks for that, not too sure if that would fix this problem though. Just have to try or:

-Duser.language=de -Duser.country=DE (and possibly) -Dclient.encoding.override=UTF-8

passed to the JVM, which is everything! BTW, using DB2 on zOS here which shouldn't cause any problems
 
I thought I would quickly ask here before going too deep. I'm not a Java person and have a small problem with a system (this is WebSphere Portal running under Linux) where an application was deployed and for Germany the currency should look like:

1.234.56

but is showing:

1,234.56

I believe that somewhere there must be setting to change this to do with Java as on other systems it is okay (searching through settings on them now.) The only thing I can think of is that on one of the systems last week I changed the JVM to be UTF-8 deom ISO-8859-1 so that it would do all the ä, ö, ü, etc but I don't think that is what it is...

IBM JVM should support the env variables listed here - http://publib.boulder.ibm.com/infoc...stics.50/diag/appendixes/env_var/env_jvm.html
Setting LANG will probably work. But this will change your default locale. Not sure whether you want that.
 
This is the sort of thing that's built-in in .NET but no doubt broken in Java.

:laugh
 
This is the sort of thing that's built-in in .NET but no doubt broken in Java.

:laugh

And, as I've pointed out, it's built-in in Java and has been for donkey's years :tired
 
All good suggestions but not quite where I'm coming from. I'm just trying to work out what parameter I should pass to the JVM to get it to display the correct currency format. The actual language and other characters (umlauts, Euro, etc.) are all being displayed correctly. In WebSphere there is the options to pass parameters to the JVM which I did with other servers to override the ISO character set with UTF-8 but this one looks slightly different. Will continue working on it, cheers...
 
I thought I would quickly ask here before going too deep. I'm not a Java person and have a small problem with a system (this is WebSphere Portal running under Linux) where an application was deployed and for Germany the currency should look like:

1.234.56

Surely it's:

1.234,56?

tim
 
All good suggestions but not quite where I'm coming from. I'm just trying to work out what parameter I should pass to the JVM to get it to display the correct currency format. The actual language and other characters (umlauts, Euro, etc.) are all being displayed correctly. In WebSphere there is the options to pass parameters to the JVM which I did with other servers to override the ISO character set with UTF-8 but this one looks slightly different. Will continue working on it, cheers...

IIRC our funny business in this area uses a windows system value.

Dunno if that's any help to you or not...
 

Advertisers

Back
Top