When the content-type
of the server is 'Content-Type:text/html'
, requests.get()
returns improperly encoded data.
However, if we have the content type explicitly as 'Content-Type:text/html; charset=utf-8'
, it returns properly encoded data.
Also, when we use urllib.urlopen()
, it returns properly encoded data.
Has anyone noticed this before? Why does requests.get()
behave like this?