Martin Panter added the comment:
After reading through the linked thread, there are a few error message
proposals:
Guido: "use data.encode('utf-8') if you want the data to be encoded in UTF-8".
(Then of course the server might not like it.)
Andrew Barnert: A UnicodeEncodeError (or subclass of it?) with text like "HTTP
body without encoding defaults to 'latin-1', which can't encode character
'\u5555' in position 30: ordinal not in range(256)")
Paul Moore: Encode as ASCII and catch UnicodeEncodeError and re-raise as a
TypeError "Unicode string supplied without an explicit encoding".
Emil, do you think any of these would help?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26045>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com