homepage

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 quentel
Recipients quentel
Date 2011年01月29日.21:15:40
SpamBayes Score 3.7492232e-13
Marked as misclassified No
Message-id <1296335741.52.0.506773731017.issue11066@psf.upfronthosting.co.za>
In-reply-to
Content
Python 3.2rc1 introduced a new version of cgi.py that handles correctly file uploads
In this version, the FieldStorage constructor receives an argument "encoding" which is the encoding used by the document holding the submitted form
On the CGI script side, there is currently no easy way to print the received form fields with another encoding than sys.stdout.encoding. 
The proposed version introduces a function, set_stdout_encoding(charset), which can be used in the CGI script to set sys.stdout to an instance of a class that uses the charset encoding. This way, print() will use this encoding. "charset" must be the encoding defined in the content-type header sent by the CGI scrpt
This class (IOMix) was written by Glen Linderman and proposed in the 3.2rc1 version, but no consensus could be reached on time for the release
Another proposed change is a rewriting of the module-level functions parse() and parse_multipart() : they now use the FieldStorage methods instead
History
Date User Action Args
2011年01月29日 21:15:41quentelsetrecipients: + quentel
2011年01月29日 21:15:41quentelsetmessageid: <1296335741.52.0.506773731017.issue11066@psf.upfronthosting.co.za>
2011年01月29日 21:15:40quentellinkissue11066 messages
2011年01月29日 21:15:40quentelcreate

AltStyle によって変換されたページ (->オリジナル) /