LocalString with null values in string originated from native are broken
jwhpryor opened this issue · comments
Unfortunately, I think this is unsupportable. I experimented with this a bit, and I notice when I print a java String
"A\0BC\0" originated from Java in native, it prints A�BC�
.
This looks like a unicode specials character for "unrepresentable".
Furthermore, the NewStringUTF
JNI call does not allow for providing a length.
Because of these two things, I'm unfortunately inclined to think this is just not possible from native JNI.