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 v+python
Recipients facundobatista, fdrake, orsenthil, v+python
Date 2011-01-31.04:43:32
SpamBayes Score 0.0013775777
Marked as misclassified No
Message-id <1296449013.51.0.99114300484.issue10479@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-01-31 04:43:33v+pythonsetrecipients: + v+python, fdrake, facundobatista, orsenthil
2011-01-31 04:43:33v+pythonsetmessageid: <1296449013.51.0.99114300484.issue10479@psf.upfronthosting.co.za>
2011-01-31 04:43:32v+pythonlinkissue10479 messages
2011-01-31 04:43:32v+pythoncreate