Home Bug Reports

Ice do not support Chinese characters

IvanFlyIvanFly Member Jiant TaoOrganization: Beijing Technology and Business UniversityProject: A software about Logistics Information Management
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");
}

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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\\&#32465;&#23450;\\config.server" << endl;
        return app.main(argc, argv, "C:\\Users\\bernard\\test\\&#32465;&#23450;\\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,
    Bernard
Sign In or Register to comment.