, wchar_t utf-32 , Windows. Linux Mac OS X * nix ( , , , : -)
wchar_t utf-16 Windows. Windows memcpy: -)
In all other respects, the conversion is algorithmic and fairly simple. Therefore, there is no need for fancy support from third-party libraries.
Here is the basic algorithm: http://unicode.org/faq/utf_bom.html#utf16-3
And you can find dozens of different implementations if you don't want to write your own :-)
source
share