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 pitrou
Recipients Arfrever, a.badger, abadger1999, benjamin.peterson, ezio.melotti, lemburg, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, vstinner
Date 2013-08-22.09:20:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1889745240.4617020.1377163209613.JavaMail.root@zimbra10-e2.priv.proxad.net>
In-reply-to <CAMpsgwYJa2rL3529z+qO7u3W3Z_P8fKky7dUKrXQa=CBRa6h1Q@mail.gmail.com>
Content
> See my message msg195769: Python3 cannot be simply used as a pipe
> because it wants to be kind by decoding binary data to Unicode,
> whereas no everybody cares of Unicode :-)

If somebody doesn't care about unicode, they can use sys.stdin.buffer.
Problem solved :-)

Note: enabling surrogateescape on stdin enables precisely the
"exception being raised far from the source of the problem" people
are afraid of.  surrogateescape on stdin allows invalid unicode strings
to slip into your application, only for a later encoding to utf-8
to fail (since lone surrogates are not allowed).  For example if you
are sending that user data over an utf-8 network protocol (perhaps
JSON-encoded or XML-encoded)...
History
Date User Action Args
2013-08-22 09:20:16pitrousetrecipients: + pitrou, lemburg, ncoghlan, vstinner, abadger1999, benjamin.peterson, ezio.melotti, a.badger, Arfrever, r.david.murray, serhiy.storchaka
2013-08-22 09:20:16pitroulinkissue18713 messages
2013-08-22 09:20:15pitroucreate