Reputation: 16682
How to print "👩" emoji (Unicode code 1F469) in Windows console app using C++?
In example below I followed Printing UTF-8 Text to the Windows Console.
#include <iostream>
#include <io.h>
#include <fcntl.h>
int main()
{
_setmode(_fileno(stdout), _O_U16TEXT);
std::wcout << L"face: 👩\n";
return 0;
}
However it only prints two questionmarks:
"Command Prompt" (cmd.exe
) app can't render this char so I'm using Windows Terminal that can render it:
Upvotes: 0
Views: 761
Reputation: 141648
The Windows Console cannot display characters outside of Plane 0. The Windows Terminal was designed to improve on the limitations of the Windows Console.
Further reading: How to use unicode characters in Windows command line?
Upvotes: 1