I want to use UNICODE in visual C++ 2015 but it doesn't work so I tried a simple tutorial. Here is the code:
#undef UNICODE
#define UNICODE
#undef STRICT
#define STRICT
#include <windows.h>
int main()
{
DWORD const infoboxOptions = MB_OK | MB_ICONINFORMATION | MB_SETFOREGROUND;
char const* const narrowText = "It's a 日本国 кошка, LOL!";
wchar_t const* const wideText = L"It's a 日本国 кошка, LOL!";
MessageBox( 0, wideText, L"Unicode (wide) text:", infoboxOptions );
MessageBoxA( 0, narrowText, "ANSI (narrow) text:", infoboxOptions );
}
It doesn't work either. Both message boxes show "????" instead of special characters.
I even tried putting wWinMainCRTStartup for the entry point, defining _UNICODE in addition to UNICODE, but nothing works.
Maybe it is because that example is not adapted to visual c++ 2015?