Improper display of Cyrillic in `pragma (msg, ...)` on Windows

Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 5 09:23:40 PDT 2016


Hi,

To view Cyrillic CMD on Windows can be used 
`std.process.executeShell("chcp 65001 ");` and it works.

What should I use to change the encoding to UTF-8 to the compiler 
messages in `pragma(msg, ...)` on Visual D?

//////////////////////////////////
import std.stdio, std.process;

void main() {

     executeShell("chcp 65001");
     writeln("Привет, мир!"); // Привет, мир! -> OK
	
     pragma(msg, "Привет, мир!"); // Привет, РјРёСЂ! -> wrong

}
//////////////////////////////////

PS C++ supports the following directive in Visual Studio:
https://msdn.microsoft.com/en-us/library/mt708823.aspx


More information about the Digitalmars-d-learn mailing list