Question: 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;

```

and it prints:
`Text is the ?.`

I've tried to change the output console's font to MS Mincho, Lucida Console and a bunch of others but they still don't display the japanese character. 

So, what do I have to do?

Answer: 
A question mark usually means Windows was unable to convert the character to the destination codepage. In the console a hollow square means the Unicode character was received correctly but it could not be displayed because the console font does not support it or it is a complex script requiring Uniscribe which the console does not handle. You can copy the square and paste it in Notepad/Wordpad and it should display correctly.

The `WriteConsoleW` Windows function can display Unicode characters and works all the way back to Windows NT. It can only write to the console so you must use `WriteFile` instead when the output is redirected. `GetConsoleMode` fails on redirected handles.

You don't say which VS version you are using and things have changed over the years but Unicode output has been decent since VS2005 if you call [`_setmode(_fileno(stdout), _O_U16TEXT);`](https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx) early in main():

```
#include <stdio.h>
#include <io.h>
#include <fcntl.h>

int main()
{
    _setmode(_fileno(stdout), _O_U16TEXT); // Call this before writing anything

    wchar_t * test = L"the 来" ;
    wprintf(L"Text is %s.\n", test);
    return 0;
}

```

See also: [Myth busting in the console](http://archives.miloush.net/michkap/archive/2010/10/07/10072032.html)
This is what worked for me:

```
#include <locale.h>

```

and in the main function,

```
setlocale(LC_ALL, "en_US.UTF-8");

```