On Thu, 3 Jun 2021 17:48:59 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> Right; I changed the code in NativeLibraries.c to pass down true UTF-8 >> instead of "modified UTF-8". Please, take a look. > > I am not sure we can pass non `modified UTF-8` through `JVM_LoadLibrary()`. > Probably some VM folks can enlighten here? Not an expert by my understanding is that the VM only deals with modified UTF-8, as does JNI. So the incoming string should be modified-UTF8 IMO and then converted to UTF16. That said, this is shared code being modified on the JDK side so you can't just change the type of string being passed in without updating all the implementations of os::dll_load to support that! ------------- PR: https://git.openjdk.java.net/jdk/pull/4169