Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

ECHOERR and color escape sequences

May
13,160
180
Why doesn't this work?

1615830998214.png


This works.

1615831028955.png
 
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);
 
Back
Top
[FOX] Ultimate Translator
Translate