March 31st, 2011, 03:26 AM
jni problem with NewStringUTF method
I have some problem with NewStringUTF method,
In old implementation we used Java 1.5.0_12 for linux,
Now after updating to 1.6.0_23, there are some errors for NewStringUTF method,
In our system using jni, the code is
jretstr = env->NewStringUTF(ret_msg);
jretsrt's type is jstring, and ret_msg is C++ char String include some DBCS
we checked the ret_msg and it was right, but jrestr would miss two chars in tail
Why does this happen? The code has never been changed.
Any one get some ideas? Thanks!
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!