Operating System - HP-UX
1845943 Members
3535 Online
110250 Solutions
New Discussion

C++ server program fails read chinese string send from Java Client program

 
liping guo_1
New Member

C++ server program fails read chinese string send from Java Client program

I’m developing a client-server enterprise program which supports multiple languages such as Chinese. Client program is java GUI that sends data to/form server, which is C++ program running on HP10.20. The program works very well on English language environment. When we set locale to Chinese on both client and server, Java Client part will display Chinese GUI and mostly it communicates with server as we expected. But when client sends Chinese data or string (which is from JTextField component where user can type in Chinese information ) to server, server can not read the string correctly, instead it will show something like “\224H”.

Anybody here experienced such issue? Any help is highly apprec
1 REPLY 1
liping guo_1
New Member

Re: C++ server program fails read chinese string send from Java Client program

I have solved the problem by myself.
The reason C++ server program failed to read chinese strings was:
Jave client should use the same character set encoding as the server does. Since my server locale is zh_TW.big5, so my java client should send data in 'big5' format instead of 'UTF-8' format.