STINNER Victor added the comment:

_setmode(self->fd, O_BINARY) change was done in Python 3.2: see the issue 
#10841. This change introduced regressions:

 - #11272: "input() has trailing carriage return on windows", fixed in Python 
3.2.1
 - #11395: "print(s) fails on Windows with long strings", fixed in Python 3.2.1
 - #13119: "Newline for print() is \n on Windows, and not \r\n as expected", 
fixed in Python 3.3 (and will be fixed in Python 3.2.4)

In Python 3.1, _setmode(self->fd, O_BINARY) was already used when Python is 
called with the -u command line option.

_setmode() supports different options:

 - _O_BINARY: no conversion
 - _O_TEXT: translate "\n" with "\r\n"
 - _O_U8TEXT: UTF-8 without BOM
 - _O_U16TEXT: UTF-16 without BOM
 - _O_WTEXT: UTF-16 with BOM

I didn't try wprintf(). This function is not used in the Python source code 
(except in the Windows launcher, which is not part of the main interpreter).

I don't know how to fix wprintf().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16587>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to