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.

作者 v+python
收信人 facundobatista, fdrake, orsenthil, v+python
日期 2011-01-31.04:43:32
SpamBayes Score 0.0013775777
Marked as misclassified
Message-id <1296449013.51.0.99114300484.issue10479@psf.upfronthosting.co.za>
In-reply-to
内容
So since cgi.py was fixed to use the .buffer attribute of sys.stdout, that leaves sys.stdout itself as a character stream, and cgitb.py can successfully write to that.

If cgitb.py never writes anything but ASCII, then maybe that should be documented, and this issue closed.

If cgitb.py writes non-ASCII, then it should use an appropriate encoding for the web application, which isn't necessarily the default encoding on the system.  Some user control over the appropriate encoding should be given, or it should be documented that the encoding of sys.stdout should be changed to an appropriate encoding, because that is where cgitb.py will write its character stream.  Guidance on how to do that would be appropriate for the documentation also, as a CGI application may be the first one a programmer might write that can't just use the default encoding configured for the system.
历史
日期 用户 动作 参数
2011-01-31 04:43:33v+python修改recipients: + v+python, fdrake, facundobatista, orsenthil
2011-01-31 04:43:33v+python修改messageid: <1296449013.51.0.99114300484.issue10479@psf.upfronthosting.co.za>
2011-01-31 04:43:32v+python链接issue10479 messages
2011-01-31 04:43:32v+python创建