The
wchar_t
type is a 16 bit character, i.e. UTF16. You also need to use the
L
prefix on all your character and string literals so the compiler generates the correct characters. So your code should look like:
int _tmain(int argc, _TCHAR* argv[])
{
setlocale( LC_ALL, "sv" ); wchar_t UTF-16_test[] = {L'å', L'ö', L'ä'};
return 0;
}