Hi,
I would like to propose and find a sponsor for this change please, which
is is export from libjava the JNU_InitializeEncoding() method, so that a
JVM can initialize the platform encoding. Currently
Java_java_lang_System_initProperties initializes the encoding, however for
a generic JVM that will naturally provide it's own System implementation,
the JVM needs a way to initialize this encoding directly. We can thus
simply export it as per the change below.. There is precendence for doing
this sort of export with Canonicalize().
Thanks
Andrew
diff --git a/src/java.base/share/native/libjava/jni_util.c
b/src/java.base/share/native/libjava/jni_util.c
--- a/src/java.base/share/native/libjava/jni_util.c
+++ b/src/java.base/share/native/libjava/jni_util.c
@@ -840,6 +840,15 @@
String_value_ID = (*env)->GetFieldID(env, strClazz, "value", "[B");
}
+/*
+ * Export this method to allow JVM to initialize platform encoding
explicitly.
+ */
+JNIEXPORT void JNICALL
+JNU_InitializeEncoding(JNIEnv *env, const char *encname)
+{
+ InitializeEncoding(env, encname);
+}
+
JNIEXPORT jstring
NewStringPlatform(JNIEnv *env, const char *str)
{
Andrew Leonard
Java Runtimes Development
IBM Hursley
IBM United Kingdom Ltd
Phone internal: 245913, external: 01962 815913
internet email: [email protected]
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU