Issue 80654 - Java locale is set based on UI language rather than locale setting
Summary: Java locale is set based on UI language rather than locale setting
Status: RESOLVED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m221
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: 4.2.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2007-08-13 14:49 UTC by mux2005
Modified: 2016-10-20 17:58 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.3
Developer Difficulty: ---


Attachments
Beanshell macro to output JVM's locale setting (7.53 KB, application/vnd.oasis.opendocument.text)
2007-08-13 14:51 UTC, mux2005
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mux2005 2007-08-13 14:49:48 UTC
Steps to reproduce:

1. Configure OpenOffice.org language settings (Tools/Options/Language
Settings/Languages to

User Interface: English (USA)
Locale setting: German(Germany)

2. Restart OOo, Open the attached document testlocale.odt
3. Run the enclosed Beanshell macro

Expected results:
Locale country code: DE
Decimal point: ,

Actual results:
Locale country code: US
Decimal point: .

4. Change the Language Settings like this

User Interface: German(Germany)
Locale setting: English (USA)

5. Restart OOo, load testlocale.odt
6. Run the macro

Expected results:
Locale country code: US
Decimal point: .

Actual results:
Locale country code: DE
Decimal point: ,

So clearly, the Locale setting of OOo's JVM depends on the UI language rather
than the locale setting. It should be the other way around. 
This problem affects a Java extension of ours which uses the locale-specific
decimal point. Users that use the English UI can't enter numbers properly.

I'm seeing this under Linux with m221 and Windows with 2.2.0.
Comment 1 mux2005 2007-08-13 14:51:04 UTC
Created attachment 47513 [details]
Beanshell macro to output JVM's locale setting
Comment 2 kpalagin 2008-01-27 20:53:22 UTC
Confirming with 2.3.1 on WiNXP - as described.
Comment 3 SVN Robot 2016-10-20 16:34:45 UTC
"damjan" committed SVN revision 1765849 into trunk:
#i80654# Java locale is set based on UI language rather than locale setting
Comment 4 damjan 2016-10-20 16:36:31 UTC
Java's language is now the "User interface" language, while its country is the "Locale setting" country. The test document included here works as expected. Resolving fixed.
Comment 5 Marcus 2016-10-20 17:58:01 UTC
@damjan:
Setting the keyword "release_blocker" doesn't mean anything. If you want to get this into 4.1.4 please set the flag "4.1.4_release_blocker?" to request this as release blocker - see on the right hand side .

HTH