Message176828
_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(). |
|
Date |
User |
Action |
Args |
2012-12-03 07:23:52 | vstinner | set | recipients:
+ vstinner, ezio.melotti, makegho |
2012-12-03 07:23:52 | vstinner | set | messageid: <1354519432.16.0.714317109686.issue16587@psf.upfronthosting.co.za> |
2012-12-03 07:23:52 | vstinner | link | issue16587 messages |
2012-12-03 07:23:51 | vstinner | create | |
|