Wide and Unicode Character Interfaces
All wide and Unicode character interfaces, such as
RWWString,
RWBasicUString,
RWUString,
wchar_t, and
wchar_t* inserters and extractors, take or produce only UTF-16 encoded characters. If you are using an XML output stream with a wide or Unicode character interface, and you try to insert into the stream a non-UTF-16 character, the stream may produce an incorrect document.
Output Streams
XML output streams convert UTF-16 encoded characters to UTF-8 before passing them on to the underlying data stream, as illustrated in
Figure 2.
You may optionally convert your strings to another encoding after extracting them from the XML.
Input Streams
XML input streams convert from UTF-8 to UTF-16 before returning wide or Unicode characters or strings, as illustrated in
Figure 3.
You may optionally convert your strings to another encoding after extracting them from the XML.