U
uday.sen
Hi,
I need to convert a string from UTF8 to wide character (wchar_t *). I
perform the same in windows using:
MultiByteToWideChar(CP_UTF8, 0, pInput, -1, pOutput, nLen);
However, in linux this API is not available. However, there exists
mbstowcs() API, which converts multibyte string to wide character. But
will this API convert UTF8 encoded string to wide character? Or this
API will convert *only ASCII* characters to wide characters?
There exists also iconv() API which converts characterset using a
characterset conversion descriptor returned by iconv_open(). But for
iconv_open(char *toCode, char* fromCode), what would be "toCode" and
"fromCode" value? I think "toCode" will be UTF8, but what would be
"fromCode"?
Thanks and regards,
- Uday
I need to convert a string from UTF8 to wide character (wchar_t *). I
perform the same in windows using:
MultiByteToWideChar(CP_UTF8, 0, pInput, -1, pOutput, nLen);
However, in linux this API is not available. However, there exists
mbstowcs() API, which converts multibyte string to wide character. But
will this API convert UTF8 encoded string to wide character? Or this
API will convert *only ASCII* characters to wide characters?
There exists also iconv() API which converts characterset using a
characterset conversion descriptor returned by iconv_open(). But for
iconv_open(char *toCode, char* fromCode), what would be "toCode" and
"fromCode" value? I think "toCode" will be UTF8, but what would be
"fromCode"?
Thanks and regards,
- Uday