mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8198697: Simplify initialization of platform encoding
Reviewed-by: redestad, sherman
This commit is contained in:
parent
b64d0ef66d
commit
c43cebb5cf
3 changed files with 61 additions and 77 deletions
|
@ -260,7 +260,6 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
PUTPROP(props, "user.variant", sprops->variant);
|
||||
}
|
||||
PUTPROP(props, "file.encoding", sprops->encoding);
|
||||
PUTPROP(props, "sun.jnu.encoding", sprops->sun_jnu_encoding);
|
||||
if (sprops->sun_stdout_encoding != NULL) {
|
||||
PUTPROP(props, "sun.stdout.encoding", sprops->sun_stdout_encoding);
|
||||
}
|
||||
|
@ -319,6 +318,7 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
/* !!! DO NOT call PUTPROP_ForPlatformNString before this line !!!
|
||||
* !!! I18n properties have not been set up yet !!!
|
||||
*/
|
||||
InitializeEncoding(env, sprops->sun_jnu_encoding);
|
||||
|
||||
/* Printing properties */
|
||||
/* Note: java.awt.printerjob is an implementation private property which
|
||||
|
@ -418,6 +418,9 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
|
|||
(*env)->DeleteLocalRef(env, jVMVal);
|
||||
}
|
||||
|
||||
// Platform defined encoding properties override any on the command line
|
||||
PUTPROP(props, "sun.jnu.encoding", sprops->sun_jnu_encoding);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue