-
Bug
-
Resolution: Fixed
-
P3
-
1.1.6, 1.3.0, 1.4.0
-
beta2
-
generic, x86
-
generic, linux, windows_nt
Name: clC74495 Date: 06/26/98
This bug was thrown aside (4097828)
as you rushed to release jdk1.1.6
as not being reproduceable but this
bug exists in jdk1.1.6 as well as
jdk1.1.5. i don't think this is a
regression.
I am currently using Japanese WinNT4.0
platform and creating a bilingual program
(Japanese/English). I would like to be able
to specify the Locale to be used as the
default from the command line but setting
the user.language and user.region system
properties via the command line do not affect
the default Locale.
run the program below (in a Japanase environment) as
java -Duser.language=en -Duser.region=US LocaleTest
the program recognizes the specified Locale as en_US
but still uses the Locale ja_JP as its default Locale!
this causes problems when using internationalization
in that the resources loaded are the Japanese
resources, but the system attempts to display
them in English (resulting in undefined character
"boxes" all over all of the menus and window
titles on screen)
--- source code begin ---
import java.util.Locale;
public class LocaleTest
{
static public void main(String[] args)
{
Locale defLoc = Locale.getDefault();
String dLang = defLoc.getLanguage();
String dRegion = defLoc.getCountry();
System.out.println("Default Locale = "+dLang+"_"+dRegion);
String language = System.getProperty("user.language", "en");
String region = System.getProperty("user.region", "US");
System.out.println("Specified Locale = "+language+"_"+region);
}
}
--- source code end ---
(Review ID: 30753)
======================================================================
- duplicates
-
JDK-4397903 default locale is always en_Us, ignoring user.language setting
- Closed
-
JDK-4472039 Passing LTR locale to JVM using "-Duser.lang/region" under arabic/Heb OS's fails
- Closed
- relates to
-
JDK-4472743 regression: EXCEPTION_ACCESS_VIOLATION in TimeZone.getSystemTimeZoneID() on W2k
- Closed