converting array of bytes to UTF-8 unicode
Posted
by
user394242
on Stack Overflow
See other posts from Stack Overflow
or by user394242
Published on 2011-01-08T17:49:09Z
Indexed on
2011/01/08
17:54 UTC
Read the original article
Hit count: 170
I have a file saved as UTF-8, and i'm reading it like this:
ReadFile(hFile, pContents, pFile->nFileSize, &dwRead, NULL);
(pContents is a BYTE* of size nFileSize)
its just a small file with 100 bytes or so, contains text which i want to read into memory in wchar_t* format, so i can set the text of edit and static controls with the unicode text.
How can i convert the bytes to UTF-8?
edit (i don't want to use fstream or wfstream)
© Stack Overflow or respective owner