All recent and latest versions of Windows (excluding XBox) use UTF-16 LE.
Note that there is an error with the way you initialize the string variable:
std::wstring sData(static_cast<wchar_t*>(pData));
This assumes that the resource ends with a final (double-byte) 0, which, I think, is not guaranteed if you simply refer to the file in your resources. You should get the size of the resource and use a constructor with two pointers for sData.
If you are worried about time (as suggested by your comment on using MultiByteToWideChar ), you should know that you are copying data from a resource into dynamic memory, and this copy is probably almost as slow as doing the conversion. If you do this only once, I will not worry about speed. I would save the text as UTF-8 and use MultiByteToWideChar , especially if the UTF-8 encoding is more efficient for your text, as this will reduce your binary.
If speed is a problem (and if you don't need to change the line at run time), I would not use std::wstring . I would make a class that provides a similar interface, but should it point directly to the resource memory, and not copy all the text into dynamic memory. This saves load time and memory.
source share