This commit is contained in:
Phil Race 2018-03-23 10:02:55 -07:00
commit cb1ef28563
10 changed files with 289 additions and 94 deletions

View file

@ -244,21 +244,8 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
PUTPROP(props, "line.separator", sprops->line_separator);
/*
* user.language
* user.script, user.country, user.variant (if user's environment specifies them)
* file.encoding
* file encoding for stdout and stderr
*/
PUTPROP(props, "user.language", sprops->language);
if (sprops->script) {
PUTPROP(props, "user.script", sprops->script);
}
if (sprops->country) {
PUTPROP(props, "user.country", sprops->country);
}
if (sprops->variant) {
PUTPROP(props, "user.variant", sprops->variant);
}
PUTPROP(props, "file.encoding", sprops->encoding);
if (sprops->sun_stdout_encoding != NULL) {
PUTPROP(props, "sun.stdout.encoding", sprops->sun_stdout_encoding);
}
@ -314,7 +301,7 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
#endif
/* !!! DO NOT call PUTPROP_ForPlatformNString before this line !!!
* !!! I18n properties have not been set up yet !!!
* !!! The platform native encoding for strings has not been set up yet !!!
*/
InitializeEncoding(env, sprops->sun_jnu_encoding);
@ -379,17 +366,6 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
PUTPROP(props, "sun.desktop", sprops->desktop);
}
/*
* unset "user.language", "user.script", "user.country", and "user.variant"
* in order to tell whether the command line option "-DXXXX=YYYY" is
* specified or not. They will be reset in fillI18nProps() below.
*/
REMOVEPROP(props, "user.language");
REMOVEPROP(props, "user.script");
REMOVEPROP(props, "user.country");
REMOVEPROP(props, "user.variant");
REMOVEPROP(props, "file.encoding");
ret = JVM_InitProperties(env, props);
/* reconstruct i18n related properties */