Unicode to UTF8 and UTF16 ?
Can anyone tell me how can i convert a unicode string to UTF8 and UTF16 ? say, i have like this ?
WCHAR unicodebuf = L"Hello how are u ???喂";
// The last charecter in the above string is (hello) in CHINEESE
WCHAR utfbuf8 = L"";
WCHAR utfbuf16 = L"";
Now i want utfbuf8 and utfbuf16 to contain the encoded value of unicodebuf in utf8 and utf16 respectively... how can i do this ?
Re: Unicode to UTF8 and UTF16 ?
WideCharToMultiByte can convert a WCHAR string to UTF-8.
It may be that WCHAR is the same as UTF-16, but someone will have to confirm that as I haven't done much with Unicode.
|All times are GMT +5.5. The time now is 08:59.|