Robert <kxrobe...@googlemail.com> added the comment:

Would this patch already solve? :

https://github.com/python/cpython/pull/19130

There seems to be another bug: The strange 'latin-1' default encoding of 
cgi.parse(), which only has effect in non-mulitpart:

    if hasattr(fp,'encoding'):
        encoding = fp.encoding
    else:
        encoding = 'latin-1'


( cgi.FieldStorage and the other functions in cgi and urllib.parse use a 
'utf-8' default correctly - and do not try fp.encoding, which is usually not 
present and not reasonable in form handling WSGI. And 
'application/x-www-form-urlencoded' implies  utf-8. )

=> that default should possibly become utf-8. Optionally cgi.parse() could take 
an extra parameter encoding=None  .

----------
nosy: +kxroberto2

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

Reply via email to