RFR: 8195129: System.load() fails to load from unicode paths [v3]
David Holmes
dholmes at openjdk.java.net
Fri Jun 4 02:16:04 UTC 2021
On Thu, 3 Jun 2021 17:48:59 GMT, Naoto Sato <naoto at 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
More information about the core-libs-dev
mailing list