R. David Murray added the comment:

Updated patch for 3.3, and a new patch for 3.4.  In 3.4, set_payload raises an 
error if non-ascii-surrogateescape text is passed in as the argument (ie: there 
are non-ascii unicode characters in the string) and no charset is specified 
with which to encode them.  In an ideal world it would instead default to 
utf-8, but because there may exist code that passes in unicode and then encodes 
it later by calling set_charset, we can't go that route in 3.4.  In 3.5, after 
the few people who may be in that boat have fixed their code to include the 
charset on set_payload, we can in fact make it default to utf-8.

I had to fix a couple 3.4 test, one of which was no longer valid because I've 
now defined the previously undefined behavior of set_payload when passed 
unicode, and one of which was just wrong but I didn't notice because of this 
bug.

----------
Added file: http://bugs.python.org/file32837/support_8bit_charset_cte.patch

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

Reply via email to