1

I've built a win32 executable with MinGW. Running it from the console correctly invokes Wine, and outputs normal text.

However, if I load that executable programmatically with "exec" functions, every character output by the child-process is prefaced by an ansi escape sequence (S becomes [?25lS). I think this means that the forwarded stdout is double escaped?

Is this a function of wine? Is this something I can disable? Is this a feature of the windows libraries I'm linking to? Does MinGW cause this?

I've tried changing the locale cout.imbue( locale("C") ), using printf instead of cout, calling system("chcp 1252"); in the child-process, and a few other miscellaneous tricks. Nothing seems to fix the output from the child-process.

user41010
  • 91
  • 8
  • 3
    Running a program (any program) from the console causes your shell to invoke `exec` in exactly the same way your own program would. Perhaps you can post a [mcve]? – n. m. could be an AI Feb 22 '23 at 18:43

1 Answers1

1

This appears to be an issue with the console in older versions of Eclipse, rather than a general/programming issue. The solution for developing and debugging is to upgrade Eclipse or use a different IDE.

Oops!

user41010
  • 91
  • 8