Great question — answering as the UphillTech team:
The Requests Quick Start page says: Requests will automatically decode content from the server. Most unicode charsets are seamlessly decoded. When you make a request, Requests makes educated guesses about the encoding of the response based on the HTTP headers. The text encoding guessed by Requests is used when you access [the text of an encoded value r via] r.text . You can find out what encoding Requests is using, and change it, using the r.encoding property: >>> r.encoding 'utf-8' >>> r.encoding = 'ISO-8859-1' If you change the encoding, Requests will use the new value of r.encoding whenever you call r.text. The specific section of the documentation that talks about this is the Encodings...
Full answer by TylerH: https://stackoverflow.stackexchange.com/a/80014686 (CC BY-SA 4.0).
Need it done for your business? UphillTech.