Converting RWCStrings and RWBasicUStrings
RWBasicUString provides conversion to and from UTF-16 and an RWCString containing UTF-8.
From UTF-8 to UTF-16
To convert from UTF-8 to UTF-16, simply construct an
RWBasicUString with your
RWCString as a parameter.
RWCString myUtf8String = “hello world”;
RWBasicUString myUtf16String(myUtf8String);
From UTF-16 to UTF-8
To convert from UTF-16 to UTF-8, use the RWBasicUString.toUTF8() function.
RWCString myUtf8String(myUtf16String.toUtf8());
See the
SourcePro API Reference Guide for more information.