I have problem on Oracle JDBC thin driver with Canada locale on client side: I'm using Oracle9i thin jdbc driver, the nls parameters in oracle database is: NLS_LANGUAGE: AMERICAN NLS_TERRITORY: AMERICA NLS_NUMERIC_CHARACTERS : .,
My java client side is running on Windows NT, which using jdbc thin driver to connect oracle database. If I set the locale in client side as "English(Canada)", it seems return me "French" number format, like ",45" (comma, instead of decimal point) for "0.45". However, If I set client side locale as "English(United States)", it returns me "0.45" as expected. So, my question: does Oracle JDBC driver always returns "French" number format evenif I set "English(Canada)" as locale? Because Canada have both English and French locale "French(Canada), and English(Canada)". How can I get "English" number format like "0.45" with "English(Canada)" locale setting?
Really appreciated any reply, and thanks a lot in advance
"DavidChen", We're pleased to have you here with us in the JDBC forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Joined: Jan 06, 2002
Thank you very much Shailesh, I added nls_charset12.zip with classes12.zip, however, I got the same problem. In client side, if I set locale as en_US, the value of NLS_NUMERIC_CHARACTERS is ".," which is right, however if I set locale as en_CA, the value of NLS_NUMERIC_CHARACTERS is ", " which is not right. Also, if I get the result by string (getString() ), and using NumberFormat to parse the String ( ex ",45"), it will raise the exception if I set locale as en_CA for NumberFormat, but works fine if I set locale as Canada_French for NumberFormat. So, I just guess, it's a bug in oracle jdbc driver, which returns French number format for en_CA locale. Thanks in advance if anyone have any idea on this problem