String encoding problem
I am not sure whether its a right place or not, but my issue might be
related to java.
I have a server running on the solaris machine, and a client on windows
machine. The client and server communicates via CORBA.
I have a user exception defined in my IDL file and my error messages
are in chinese characters. Since i had problem displaying the error
message properly on the client side, i decided to encode the messages.
Actaully, the messages in IDL is defined as String.
Here's a snippet of the code i tried to encode the strings,
//CORBA USER EXCEPTION defined in IDL
Exception srvError{
string errorCode;
string errorMsg;
}
//on server side //try catch not included below
errorCode =new String(errorCode.getBytes(encode),encode);//encode is the encoding used to encode the string. ex.: encode=Shift_JIS
errorMsg =new String(errorMsg.getBytes(encode),encode);
thrownew srvError(errorCode,errorMsg);
//on client side//e is srvError in the catch
System.out.println(e.errorCode);
System.out.println(e.errorMsg);
However, my error messages are still crooked and not displayed properly. If other than chinese characters(if in english) it shows well.
I know its encoding problem, but i do not know how it works in CORBA.
Anybody has any comments or suggestions to solve the above problem.
Thanx in advance.

