This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | vstinner |
|---|---|
| Recipients | Arfrever, ezio.melotti, makegho, vstinner |
| Date | 2012年12月03日.11:49:58 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <CAMpsgwZN8e=EqA87h5rwZuZRtCpwtxUjw9axHrh6sE-XJCSqJA@mail.gmail.com> |
| In-reply-to | <1354520724.73.0.0598673724792.issue16587@psf.upfronthosting.co.za> |
| Content | |
|---|---|
> _setmode(self->fd, O_BINARY) change was done in Python 3.2: see the issue #10841 The main reason was to be able to read binary file from sys.stdin using the CGI module: see the issue #4953. In _O_TEXT mode, 0x0A byte is replaced with 0x0A 0x0D (or the opposite, I never remember) which corrupt binary files. Articles about _setmode() and wprintf(): "A confluence of circumstances leaves a stone unturned..." http://blogs.msdn.com/b/michkap/archive/2010/09/23/10066660.aspx "Conventional wisdom is retarded, aka What the @#%&* is _O_U16TEXT?" http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx See also issue #1602 (Windows console doesn't print or input Unicode). |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2012年12月03日 11:49:58 | vstinner | set | recipients: + vstinner, ezio.melotti, Arfrever, makegho |
| 2012年12月03日 11:49:58 | vstinner | link | issue16587 messages |
| 2012年12月03日 11:49:58 | vstinner | create | |