possible problem with JNI GetStringUTFChars

David Holmes david.holmes at oracle.com
Sat Jan 26 23:19:30 UTC 2019

On 27/01/2019 3:08 am, Martin Buchholz wrote:
> It's a pet peeve that the name GetStringUTFChars is deeply misleading -
> there are many "UTF"s, and this encoding is meant for use with the JVM
> only.  The documentation should make it clearer that this is NOT the UTF-8
> you might expect.

It does!


const char * GetStringUTFChars(JNIEnv *env, jstring string, jboolean 

Returns a pointer to an array of bytes representing the string in 
modified UTF-8 encoding.




More information about the core-libs-dev mailing list