Dealing with chinese characters in JNI
Hi everyone, I'm currently working on JNI and need some help regarding the storage of chinese characters.
Within Java, I have a String of chinese characters and this i send into C++, which accepts it as a jstring. I'll need to use this string as a char* format to input into other DLLs, and have tried many conversions but I just can't get back the chinese characters in char* form. Can anyone help me in this by giving a short example code please? Thanks alot!
Re: Dealing with chinese characters in JNI
Quote:
Originally Posted by
rukawa84
Hi everyone, I'm currently working on JNI and need some help regarding the storage of chinese characters.
JNI is Java technology. Wouldn't it have been better to ask in the Java forum?
Regards,
Paul McKenzie
Re: Dealing with chinese characters in JNI
I know nothing about JNI - so I hit up Wikipedia - and it has some interesting examples.
http://en.wikipedia.org/wiki/Java_Native_Interface
http://java.sun.com/developer/online...jnistring.html (thanks to Google)
>> I'll need to use this string as a char* format to input into other DLLs
Hopefully, these DLL's support UTF8 encoded strings in Chinese.
gg
Re: Dealing with chinese characters in JNI
Hi Paul,
Yeah I was wondering about this too, but I decided on C++ as it may just be an issue of encoding conversions on the C++ side.
Hi CodePlug,
Yeah I've been to these links before, but somehow didn't work out for me. Thanks for helping to search though :)
Regards,
Rukawa