ECHOERR and color escape sequences

May 20, 2008
11,185
94
Syracuse, NY, USA
Why doesn't this work?

1615830998214.png


This works.

1615831028955.png
 
May 20, 2008
11,185
94
Syracuse, NY, USA
Ask Microsoft; they handle ANSI in Win 10. Apparently they don't want you to use ANSI for STDERR.
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);
 
Thread starter Similar threads Forum Replies Date
CWBillow Support 8
samintz Support 33
gentzel Support 6
M Support 4
Stefano Piccardi Support 9