How-To work with UTF8 encoding
The Windows APIs often treat strings as UCS-2 encoded, whereas most POSIX APIs expect UTF-8. The library provides simple functions for converting between the two encodings.
Warning
These functions only exist for the Win32 plattform.
Transcode between UCS-2 and UTF-8
1#include <liberate/string/utf8.h>
2
3auto utf = liberate::string::to_utf8(/* some UCS-2 input as a TCHAR pointer */);
4auto back = liberate::string::from_utf8(utf);