Issue 80654

Summary: Java locale is set based on UI language rather than locale setting
Product: General Reporter: mux2005 <mux2005>
Component: codeAssignee: AOO issues mailing list <issues>
Status: RESOLVED FIXED QA Contact:
Severity: Trivial    
Priority: P3 CC: baumux, chris_mux, chrlutz, damjan, issues, kpalagin
Version: 680m221Keywords: release_blocker
Target Milestone: 4.2.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.1.3
Developer Difficulty: ---
Attachments:
Description Flags
Beanshell macro to output JVM's locale setting none

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