I was wondering if there is a recommended \'cross\' Windows and Linux method for the purpose of converting strings from UTF-16LE to UTF-8? or one should use different method
#include wchar_t *src = ...; // or char16_t* on non-Windows platforms int srclen = ...; char *dst = ...; int dstlen = ...; iconv_t conv = iconv_open("UTF-8", "UTF-16"); iconv(conv, (char*)&src, &srclen, &dst, &dstlen); iconv_close(conv);