Glenn Linderman <v+pyt...@g.nevcal.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10479>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to