Archived
This forum has been archived. Please start a new discussion on GitHub.
Unicode question
Hello,
In my Ice-file I defined a function that returns a string. In the documentation is mentioned that the Slice built-in string type is able to work with Unicode. Through the Client-Side-C++ mapping a std::string is formed. Works this std::string also with Unicode? If not, what can I do to use Unicode in my application?
Thanks
In my Ice-file I defined a function that returns a string. In the documentation is mentioned that the Slice built-in string type is able to work with Unicode. Through the Client-Side-C++ mapping a std::string is formed. Works this std::string also with Unicode? If not, what can I do to use Unicode in my application?
Thanks
0
Comments
-
Hi,
Strings in Ice/C++ are treated as UTF-8; utility functions are provided for converting from std::wstring to std::string.
Your program will need to include <IceUtil/Unicode.h>, which defines two functions:namespace IceUtil { std::string wstringToString(const std::wstring&); std::wstring stringToWstring(const std::string&); }
- Mark0