Archived
This forum has been archived. Please start a new discussion on GitHub.
Ice do not support Chinese characters
Hi
I find that Ice do not support Chinese Characters
There may be something wrong with the function Ice::nativeToUTF8.
pls look at the picture in the attach files. It descrip how the exception occured.
This situation can be reproduced in the Sample codes.
e.g: C:\Ice-3.4.0\cpp\demo\Ice\bidir
main(int argc, char* argv[])
{
CallbackServer app;
return app.main(argc, argv, "C:\\Ice-3.4.0\\cpp\\demo\\Ice\\绑定\\config.server");
}
I find that Ice do not support Chinese Characters
There may be something wrong with the function Ice::nativeToUTF8.
pls look at the picture in the attach files. It descrip how the exception occured.
This situation can be reproduced in the Sample codes.
e.g: C:\Ice-3.4.0\cpp\demo\Ice\bidir
main(int argc, char* argv[])
{
CallbackServer app;
return app.main(argc, argv, "C:\\Ice-3.4.0\\cpp\\demo\\Ice\\绑定\\config.server");
}
0
Comments
-
Hi Jiant Tao,
I just tried myself, and it works fine:int main(int argc, char* argv[]) { CallbackServer app; cerr << "Config file with Chinese characters: C:\\Users\\bernard\\test\\绑定\\config.server" << endl; return app.main(argc, argv, "C:\\Users\\bernard\\test\\绑定\\config.server"); }
Since you didn't install a string converter, you need to make sure the source file is UTF-8 (and that Visual Studio knows about it). I used File > Save Server.cpp as > Save with Encoding to select Unicode (UTF-8 without signature) - Codepage 65001 as my codepage.
Cheers,
Bernard0