As the question says, do I have to do in order to print Unicode characters to the output console? And what settings do I have to use? Right now I have this code:
wchar_t* text = L"the 来";
wprintf(L"Text is %s.\n", text);
return EXIT_SUCCESS;
Text is the ?.
This is code that works for me (VS2017) - project with Unicode enabled
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
int main()
{
_setmode(_fileno(stdout), _O_U16TEXT);
wchar_t * test = L"the 来. Testing unicode -- English -- Ελληνικά -- Español." ;
wprintf(L"%s\n", test);
}
This is console
After copying it to the Notepad++ I see the proper string
the 来. Testing unicode -- English -- Ελληνικά -- Español.
OS - Windows 7 English, Console font - Lucida Console