https://issues.dlang.org/show_bug.cgi?id=4243
Johan Engelen <goejenda...@zonnet.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |goejenda...@zonnet.nl --- Comment #1 from Johan Engelen <goejenda...@zonnet.nl> --- On Windows, with DMD, the following code works to set stdout to binary mode: version(Windows) { // See Phobos' stdio.File.rawWrite { import std.stdio; immutable fd = fileno(stdout.getFP()); setmode(fd, _O_BINARY); version(CRuntime_DigitalMars) { import core.atomic : atomicOp; atomicOp!"&="(__fhnd_info[fd], ~FHND_TEXT); } } } Note the extra CRuntime_DigitalMars bit. --