Charles Dye Super Moderator May 4,948 126 Staff member Mar 15, 2021 #2 Do you have a color set for stderr output?
rconn Administrator May 13,015 192 Staff member Mar 15, 2021 #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 12,846 164 Mar 15, 2021 #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 12,846 164 Mar 15, 2021 #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);