Now, on windows 7 and 10, setconsoleoutputcp(65001/*aka cp_utf8*/) works as expected To set a console's output code page, use the setconsoleoutputcp function Moreover, the console font must contain desired characters, and must not be terminal.
g drive maryacedez pm for price : NSFWBNS
The console's code page defaults initially to the system's oem code page
To change the console's code page, use the setconsolecp or setconsoleoutputcp functions, or use the chcp or mode con cp select= commands.
Setconsoleoutputcp function sets the output code page used by the console associated with the calling process A console uses its output code page to translate the character values written by the various output functions into the images displayed in the console window. SetConsoleOutputCP是Windows控制台API函数,属于Win32平台标准开发接口,用于设置与调用进程关联的控制台输出代码页。 Undocumented in source but is binding to windows
You might be able to learn more by searching the web for its name Extern (windows) @ system nothrow @ nogc bool setconsoleoutputcp ( uint ) Setconsolecp only affects input, so it is no surprise at all that it doesn't work in your example It is setconsoleoutputcp that controls output encoding.
Um aplicativo pode usar as funções setconsolecp e getconsolecp para definir e recuperar as páginas de código de entrada de um console e as funções setconsoleoutputcp e getconsoleoutputcp para definir e recuperar suas páginas de código de saída.