java native Unicode <--> C++ Strings

D

Dirk Bromberg

Hi all,

i've implemented a wrapper from Managed C++ to Java. Now i've som
trouble with exchanging text with chinese chars...

I have an Managed C++ String* (->UNICODE<-) and want to create a new
Java String, but how must i convert to have the right encoding?

Any ideas?

Is this a problem with Unicode and the Multibyte Character Set ??

Thx

Dirk
 
C

Chris Uppal

Dirk said:
I have an Managed C++ String* (->UNICODE<-) and want to create a new
Java String, but how must i convert to have the right encoding?

As far as I know, the physical representation of Unicode strings used by both
C# and Java is as a sequence of 16-bit values (miscalled "char"s in both
languages) which are the UTF-16 encoding of the abstract Unicode text.

I.e. you're golden. No conversion to do, just copy the chars.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top