-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
7
-
x86
-
windows_7
FULL PRODUCT VERSION :
1.7.0-b147
ADDITIONAL OS VERSION INFORMATION :
Windows 7 x64 SP1
EXTRA RELEVANT SYSTEM CONFIGURATION :
English version of windows, Swedish locale configured.
A DESCRIPTION OF THE PROBLEM :
Locale#getDefault returns the en_US locale with jdk 1.7.0-b147, whereas jdk 1.6.0_27-b07 correctly returns sv_SE.
This is also evident when running System.getProperties().list(System.out):
jdk 1.7.0-b147 list the property user.country=US
whereas 1.6.0_27-b07 properly list the property user.country=SE
Locale.getDefault(Locale.Category.FORMAT) properly returns sv_SE
Locale.getDefault(Locale.Category.DISPLAY) erroneously returns en_US
REGRESSION. Last worked in version 6u26
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set the locale to Swedish.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Locale;
public class LocaleTest {
public static void main(String[] args) {
System.out.println(Locale.getDefault());
}
}
---------- END SOURCE ----------
1.7.0-b147
ADDITIONAL OS VERSION INFORMATION :
Windows 7 x64 SP1
EXTRA RELEVANT SYSTEM CONFIGURATION :
English version of windows, Swedish locale configured.
A DESCRIPTION OF THE PROBLEM :
Locale#getDefault returns the en_US locale with jdk 1.7.0-b147, whereas jdk 1.6.0_27-b07 correctly returns sv_SE.
This is also evident when running System.getProperties().list(System.out):
jdk 1.7.0-b147 list the property user.country=US
whereas 1.6.0_27-b07 properly list the property user.country=SE
Locale.getDefault(Locale.Category.FORMAT) properly returns sv_SE
Locale.getDefault(Locale.Category.DISPLAY) erroneously returns en_US
REGRESSION. Last worked in version 6u26
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set the locale to Swedish.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Locale;
public class LocaleTest {
public static void main(String[] args) {
System.out.println(Locale.getDefault());
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-7039901 JDK7 doesn't see the correct default locale
- Closed
- relates to
-
JDK-4700857 RFE: separating user locale and user interface locale
- Closed