Home Help Center

Status on wstring?

jgaajgaa Member Jarle AaseOrganization: Jgaa's InternetProject: War FTP Daemon
Hi,

I'm new to ICE. I read the documentation this weekend but I've not yet started any coding. My apps use unicode alot, and I'm wondering if wstrings are supported with C++?

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, Slice strings use the Unicode UTF-8 format. You can convert UTF-8 std::string to UTF-16 std::wstring and vice versa with conversion methods from include/IceUtil/Unicode.h. For examples on how to use these methods, see test/IceUtil/Unicode.cpp.

    Benoit.
  • jgaajgaa Member Jarle AaseOrganization: Jgaa's InternetProject: War FTP Daemon
    So, what you are saying is basically that std::wstring is unsupported, but that I can convert to wstring from UTF8.

    What about adding an option to slice2cpp to replace std::string with std::wstring? That will make unicode-programming more comfortable ;)

    Jarle
Sign In or Register to comment.