You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: