Charles Dye Super Moderator May 5,404 166 Staff member 2021-03-15 #2 Do you have a color set for stderr output?
rconn Administrator May 13,695 257 Staff member 2021-03-15 #3 Ask Microsoft; they handle ANSI in Win 10. Apparently they don't want you to use ANSI for STDERR. And your second example is not outputting to STDERR, it's writing to STDOUT and redirecting that to STDERR.
Ask Microsoft; they handle ANSI in Win 10. Apparently they don't want you to use ANSI for STDERR. And your second example is not outputting to STDERR, it's writing to STDOUT and redirecting that to STDERR.
vefatica May 13,834 211 2021-03-15 #4 Charles Dye said: Do you have a color set for stderr output? Click to expand... Normally, yes. In my test, no.
Charles Dye said: Do you have a color set for stderr output? Click to expand... Normally, yes. In my test, no.
vefatica May 13,834 211 2021-03-15 #5 rconn said: Ask Microsoft; they handle ANSI in Win 10. Apparently they don't want you to use ANSI for STDERR. Click to expand... I dunno! Both of these work. Code: fwprintf(stderr, L"\x01b[31;1mfoo\x01b[0m\n"); WriteConsoleW(GetStdHandle(STD_ERROR_HANDLE), L"\x01b[31;1mfoo\x01b[0m\n", 15, NULL, NULL);
rconn said: Ask Microsoft; they handle ANSI in Win 10. Apparently they don't want you to use ANSI for STDERR. Click to expand... I dunno! Both of these work. Code: fwprintf(stderr, L"\x01b[31;1mfoo\x01b[0m\n"); WriteConsoleW(GetStdHandle(STD_ERROR_HANDLE), L"\x01b[31;1mfoo\x01b[0m\n", 15, NULL, NULL);