by Giovanni Dicanio
C++ code that wraps the Win32 APIs MultiByteToWideChar() and WideCharToMultiByte() in a convenient way, using ATL/MFC CString(A/W) classes.
This code can be used for Unicode conversions between UTF-16 and UTF-8.
ATL/MFC string classes are used, in particular:
CStringA
is used to store UTF-8 textCStringW
is used to store UTF-16 ("wide") text
The reusable code can be found in the UnicodeConvAtl.h and UnicodeConvAtl.cpp files.