Consultor Eletrônico



Kbase P25613: When sending/receiving Japanese messages between C++ and JM
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/11/2003
Status: Unverified

FACT(s) (Environment):

SonicMQ

SYMPTOM(s):

When sending/receiving Japanese messages between C++ and JMS clients, Japanese letters become garbage.

Using the sample programs:
C++ client: <SonicCClient5.0-141install>\Win32\samples\CPP\TopicPubSub\Chat
Java client: <SonicMQ5.0 install>\samples\TopicPubSub\Chat

CAUSE:

Different code page is used.

FIX:

You always should convert your multibyte message to unicode if you
need interoperability between platforms.

Use "BytesMessage" instead of "TextMessage" for Java client.
Modify C++ program to convert Shift_JIS (or whatever) to UTF-8. You can use "MutliByteToWideChar" and "WideCharToMultiByte" on Windows.