How to convert C++ Unicode to jstring
843829Feb 18 2003 — edited Feb 18 2003I am using Microsoft Visual C++ and need to convert a Unicode string to a jstring to pass back to java.
I know I can do the following:
LPWSTR ustr = ...
const char *str = W2A(ustr);
jstring jstr = env->NewStringUTF(str);
But by doing this I am converting from Unicode->Ascii->Unicode. Is there some way to do this without going to Ascii?
Thanks