Unicode const char* to JString using JNI and C++
问题 Simple question. How can I get a jstring out of a unicode const char*, using JNI and C++? Here's my issue, and what I have already tried: const char* value = (some value from server); (*env)->NewStringUTF(value); The issue here is that NewStringUTF returns a UTF string, and it does not like some of the non-UTF8 characters (kind of obvious, but worth a simple try). Attempt 2, using NewString: const char* value = (some value from server); (*env)->NewString(value, strlen(value)); While NewString