◐ Shell
clean mode source ↗

Message 176734 - Python tracker

If the standard streams are not used through Python, this hack can be used to work around the bug on C side:

#ifdef WIN32
#include <fcntl.h>
#endif

...

Py_Initialize();

#ifdef WIN32
_setmode(stdin->_file, O_TEXT);
_setmode(stdout->_file, O_TEXT);
_setmode(stderr->_file, O_TEXT);
#endif