on win32 writef and friends don't use redirected std handles if they are piped. stdin/out/err handles 0, 1 and 2 are not the redirected versions on win32. one needs to get redirected handles with GetStdHandle(STD_INPUT_HANDLE); etc. therefore, the std handles from std.c.stdio used in std.stdio probably cannot be constant.
I'd work on this but don't have a Windows machine. Could someone else take this bug over? Also, is it reproducible on D2? Thanks.
In fact, I have a working plugin that retabifies source, passed to stdin, though, as I see it uses my io streams that I wrote in order to fix bug 2742 :)
I'm putting this up for grabs as I don't have a Windows system to test on.
Is this bug still valid? Does it apply to D2?
Validated that this issue is resolved on both Win7 and Win10. No problems encountered after compiling with -m32 and piping output of resulting executable to file.