This forum has been archived. Please start a new discussion on GitHub.

session using std::wstring instead of std::string

In my system I store all password and login with std::wstring type ,
so I want to use this type to create a Session on Glaicer2 .

It is possible to make a session using std::wstring like type for login and password instead of std::string ?


  • bernard
    bernard Jupiter, FL
    Hi Andrea,

    As far as what goes "on the wire", using std::string or std::wstring in the C++ API makes no difference: Ice always encodes Slice strings as UTF-8 sequences.

    So the simplest solution your C++ Glacier2 client is to build your own custom version of the Glacier2 C++ client API, i.e.:
    - add the desired cpp:type:wstring metadata to slice/Glacier2/
    - "translate" Glacier2/, Glacier2/, Glacier2/ to C++ with slice2cpp
    - build a library from the generated C++ code (e.g. Glacier2Tvblob32.dll), or incorporate this code directly into your application

  • thanks Bernard