Results 1 to 2 of 2

Thread: Ice do not support Chinese characters

  1. #1
    IvanFly's Avatar
    IvanFly is offline Registered User
    Name: Jiant Tao
    Organization: Beijing Technology and Business University
    Project: A software about Logistics Information Management
    Join Date
    May 2010
    Posts
    3

    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");
    }
    Attached Images Attached Images

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Jiant Tao,

    I just tried myself, and it works fine:

    Code:
    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,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. InitializationData no Support Chinese Path
    By wang shuqiang in forum Bug Reports
    Replies: 2
    Last Post: 03-07-2011, 12:23 PM
  2. IceRuby stringify has null characters
    By swaj in forum Bug Reports
    Replies: 3
    Last Post: 08-05-2010, 12:32 PM
  3. Replies: 0
    Last Post: 04-09-2009, 05:50 AM
  4. Help, does IcePatch support Chinese directory?
    By youyou in forum Help Center
    Replies: 2
    Last Post: 12-12-2004, 09:00 PM
  5. Where's the chinese document of ICE.
    By siberian in forum Help Center
    Replies: 1
    Last Post: 05-11-2004, 09:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •