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

R. David said:
(I believe http uses latin-1 when no charset is specified, but I need to double 
check that)

See http://bugs.python.org/issue4953#msg121864 ASCII and UTF-8 are what HTTP 
defines. Some implementations may, in fact, use latin-1 instead of ASCII in 
some places.  Not sure if we want Python CGI to do that or not.

Thanks for getting the email APIs in the docs... shouldn't have to bug you as 
much that way :)

Antoine said:
(this is all funny in the light of the web-sig discussion where people explain 
that CGI is such a natural model)

Thanks for clarifying the stdin buffering vs. binary issue... it is as I 
suspected.  Maybe you can also explain the circumstances in which "my" Windows 
code is needed, and whether Python's "-u" does it automatically, but I still 
believe that "-u" shouldn't be necessary for a properly functioning program, 
not even a CGI program... it seems like a hack to allow some programs to work 
without other changes, so might be a useful feature, but hopefully not a 
required part of invoking a CGI program.

The CGI interface is "self describing", when you follow the standards, and use 
the proper decoding for the proper pieces.  In that way, it is similar to 
email.  It is certainly not as simple as using UTF-8 everywhere, but 
compatibility with things invented before UTF-8 even existed somewhat prevents 
the simplest solution, and then not everything is text, either.  At least it is 
documented, and permits full UNICODE data to be passed around where needed, and 
permits binary to be passed around where that is needed, when the specs are 
adhered to.

----------

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

Reply via email to