Message257767
| Author |
gvanrossum |
| Recipients |
Emil Stenström, ezio.melotti, gvanrossum, martin.panter, vstinner |
| Date |
2016年01月08日.16:45:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1452271510.56.0.590174120995.issue26045@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
BTW the error and traceback will look something like this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/guido/src/cpython/Lib/http/client.py", line 1138, in _send_request
self.putheader(hdr, value)
File "/Users/guido/src/cpython/Lib/http/client.py", line 1062, in putheader
header = _encode(header, 'ascii', 'header')
File "/Users/guido/src/cpython/Lib/http/client.py", line 161, in _encode
(name.title(), data[err.start:err.end], name)) from None
UnicodeEncodeError: 'ascii' codec can't encode character '\u1234' in position 3: Header ('ሴ') is not valid Latin-1. Use header.encode('utf-8') if you want to send it encoded in UTF-8. |
|