When loading a package from a text/plain source, its encoding is assumed to be 'iso-8859-1' (latin) instead of the standard 'utf-8'.
$ curl -vv <redacted>.json | od -a -tx2
...
< HTTP/1.1 200 OK
...
< Content-Type: text/plain
...
0000000 { " n a m e " : " t e s t 3 " ,
227b 616e 656d 3a22 7422 7365 3374 2c22
0000020 " t i t l e " : " R � � u n i o
7422 7469 656c 3a22 5222 a9c3 6e75 6f69
The reason for this bug is that requests has that iso-8859-1 assumption which is simply irrelevant for jsons. Since json strings are always utf8 encoded, it's safe to override the encoding.
When loading a package from a
text/plain
source, its encoding is assumed to be 'iso-8859-1' (latin) instead of the standard 'utf-8'.This is proper UTF8 for the letter “é”.
On the other hand,
is garbled.