[Answered ]-How to send utf-8 content in a urllib2 request?

2👍

You need to pass only byte strings to Request. This applies to the headers, the url and the body.

If any of those three inputs contain Unicode values, automatic conversions between Unicode and strings will take place when concatenating, which will invariably lead to grief.

Leave a comment