提交 7f080213 编写于 作者: N naoto

7073906: Locale.getDefault() returns wrong Locale for Java SE 7

Reviewed-by: okutsu
上级 6c1bcda5
......@@ -563,6 +563,18 @@ GetJavaProperties(JNIEnv* env)
{
char * display_encoding;
// Windows UI Language selection list only cares "language"
// information of the UI Language. For example, the list
// just lists "English" but it actually means "en_US", and
// the user cannot select "en_GB" (if exists) in the list.
// So, this hack is to use the user LCID region information
// for the UI Language, if the "language" portion of those
// two locales are the same.
if (PRIMARYLANGID(LANGIDFROMLCID(userDefaultLCID)) ==
PRIMARYLANGID(LANGIDFROMLCID(userDefaultUILang))) {
userDefaultUILang = userDefaultLCID;
}
SetupI18nProps(userDefaultUILang,
&sprops.language,
&sprops.script,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册