Home Help Center

encoding error when Ice java client get string from Ice c++ server

I use ice java client to get chinese string from Ice c++ server,but it show "?"(0x3f) all. I compile java client with encoding utf-8,error occurs too. But when string is only ascii, it works fine.


Ice Server:
Linux 2.4.30 + gcc 3.3.4 + Ice-2.1.2 + ISO-8859-1

Ice Client1:
Windows Xp home + Jdk 1.5 + IceJ-2.1.2 + GBK
Ice Client2:
Linux 2.4.30 + gcc 3.3.4 + IceJ-2.1.2 + ISO-8859-1
Ice Client3:
Linux 2.4.30 + gcc 3.3.4 + Ice-2.1.2 + ISO-8859-1

slice:
class User {
string Name;//may be chinese string
...
};
interface xx {
User GetUser(int key);
}

Ice Client1: ? ? ?
Ice Client2: ? ? ?
Ice Client3: (is ok,show chinese string)


I guess Ice java client receive a utf-8 stream from server, but evaluate it to a string fail. Have any ideas?

Comments

Sign In or Register to comment.