Built-in String Converters in C++98
Ice provides three string converters to cover common conversion requirements:
- The Unicode wstring converter
This is a string converter that converts between Unicode wide strings and UTF-8 strings. Unless you install a different string converter, this is the default converter that is used for wide strings.
- The iconv string converter (Linux, macOS, Unix)
Theiconvstring converter converts strings using theiconvconversion facility. It can be used to convert either wide or narrow strings.
- The Windows string converter (Windows only)
This string converter converts between multi-byte and UTF-8 strings and usesMultiByteToWideCharandWideCharToMultiBytefor its implementation.
These string converters can be created through factory functions in the Ice namespace:
C++
namespace Ice
{
WstringConverterPtr createUnicodeWstringConverter();
template<typename charT>
IceUtil::Handle<BasicStringConverter<charT>> createIconvStringConverter(const std::string& internalCode = "");
StringConverterPtr createWindowsStringConverter(unsigned int codepage);
}