Displaying Unicode in Powershell

Note: With respect to PowerShell commands alone, only the choice of font matters, assuming that your source-code files are properly encoded; with respect to external programs, $OutputEncoding, [Console]::InputEncoding and [Console]::OutputEncoding matter too. The PowerShell Core (v6+) perspective (see next section for Windows PowerShell), irrespective of character rendering issues (also covered in the next section), with … Read more

Output unicode strings in Windows console app

I have verified a solution here using Visual Studio 2010. Via this MSDN article and MSDN blog post. The trick is an obscure call to _setmode(…, _O_U16TEXT). Solution: #include <iostream> #include <io.h> #include <fcntl.h> int wmain(int argc, wchar_t* argv[]) { _setmode(_fileno(stdout), _O_U16TEXT); std::wcout << L”Testing unicode — English — Ελληνικά — Español.” << std::endl; } … Read more