Like in:
u\'Hello\'
My guess is that it indicates \"Unicode\", is it correct?
If so, since when is it available?
I came here because I had funny-char-syndrome on my requests
output. I thought response.text
would give me a properly decoded string, but in the output I found funny double-chars where German umlauts should have been.
Turns out response.encoding
was empty somehow and so response
did not know how to properly decode the content and just treated it as ASCII (I guess).
My solution was to get the raw bytes with 'response.content' and manually apply decode('utf_8')
to it. The result was schöne Umlaute.
The correctly decoded
für
vs. the improperly decoded
fĂźr