Peter Csapo <[email protected]> added the comment:
I have having the same issues as Jimbofbx. This seems to stem from changes due
to issue 10841. All stdio is now opened in binary mode, in consideration that
it is the TextIOWrapper's job to do endline translation.
The problem here is that the newline mode = '\n' for the TextIOWrapper created
for stdout. ( see pythonrun.c: create_stdio() ). For windows, the newline mode
for stdin is already set to null enabling universal newline translation on
input, and it should be set to null for newline transation on output as well.
OLD CODE
newline = "\n";
#ifdef MS_WINDOWS
if (!write_mode) {
/* translate \r\n to \n for sys.stdin on Windows */
newline = NULL;
}
#endif
FIXED??? CODE
newline = "\n";
#ifdef MS_WINDOWS
/* translate \r\n to \n for sys.stdin on Windows */
/* translate \n to \r\n for sys.stdout on Windows */
newline = NULL;
#endif
----------
nosy: +astrobuf
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11990>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com