On Tuesday 18 May 2004 5:46 pm, James Simmons wrote:
> I wish that where true. I was using regualer char strings in JNI code
> for a JVM and it expects unicode strings. The JVM was braffing
> because of this.

Just to be clear, Java doesn't use UTF-8, it uses UTF-16, a wide 
character encoding. You can convert to/from UTF-16 with iconv, and it 
works pretty much the same way as converting between any other 
character encoding.

But, if you're specificially using JNI, there are JNI calls to handle 
strings that you're "supposed" to use to convert between Java UTF-16 
jstrings and UTF-8 char *strings. See: 
<http://java.sun.com/docs/books/tutorial/native1.1/implementing/string.html>

-- 
Wesley J. Landaker <[EMAIL PROTECTED]>
OpenPGP FP: 4135 2A3B 4726 ACC5 9094  0097 F0A9 8A4C 4CD6 E3D2

Attachment: pgpGBeUuqgs0D.pgp
Description: signature

Reply via email to