Input Stream Example
Similarly, if you want to read in a document containing a UTF-16 string and then convert the string to Shift-JIS, write the following.
 
#include "rw/i18n/RWUFromUnicodeConverter.h"
RWUFromUnicodeConverter toShiftJis(“Shift-JIS”);
RWObjectInputStream out = RWXmlObjectInputStreamImp::make(cin);
 
RWUString someRWUString;
in >> someRWUString;
someRWUString.toBytes(toShiftJis); // 1
//1 Use the toBytes() method of the RWUString to convert from UTF-16 to Shift-JIS.