An application wants to apply ANSI escape sequences, e.g. with printf ("\033[41mred\033[0m\n").
In the MinGW console (MSYS running in Windows command console), this is not interpreted but the escape character renders as its VGA graphics code.
This problem has been reported before, actually 5 years ago and 10 years ago, by other people, but never responded.
Arguably, the non-working graphics could be excused by pointing out the Windows console does not run ANSI controls, BUT:
MSYS native programs, like cat, are obviously capabale of doing the transformation transparently, so that e.g. the output produced as above,
when piped through cat, DOES produce the desired effect!
One (incomplete) explanation I found is that an application should be linked against the msys DLL to make this work, so the question is:
How is that accomplished?
Apparently, MSYS tools (like cat) are linked against msys (otherwise it wouldn't work as described above), so why not my own application and how can I change that?
Raising priority for two reasons:
* the inconsistency between user applications and msys applications, and thus between invoking the user application alone or in a pipe
* the period of 10 years this problem has received no answer
> Raising priority for two reasons:...
You don't get to make that judgement: priority escalation is the exclusive prerogative of project administrators and their nominated assignees. Since you are neither, and have ignored the warning printed in red, at the top of the ticket index page, (whence you would have raised this ticket), applying our standard algorithm:--
NewBasePriority = 2 * OldBasePriority - UserAssignedPriority
Thus, reassigning as:--
NewBasePriority = 2 * 5 - 7 = 3
Furthermore, as you've actually noted, native windows (MinGW) applications don't support ANSI terminal control, so this is not a MinGW bug anyway. If you want to build as an MSYS application, then you must use MSYS (not MinGW) development tools, and if you need help with that this is not the place to seek it; use the mailing list.
Closing, as invalid.