title: python requests fails to decode utf-8 API response
body: <p>I'm trying to get the response JSON from the following API endpoint <code>https://datos.madrid.es/egob/catalogo/205026-0-cementerios.json</code>. My code is:</p>
  
  <pre><code>import requests
  
  url = 'https://datos.madrid.es/egob/catalogo/205026-0-cementerios.json'
  r = requests.get(url)
  r.json()
  </code></pre>
  
  <p>It fails with the error:</p>
  
  <pre><code>json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  </code></pre>
  
  <p>If I get the encoding from the request, it's empty. So I've tried to force the encoding before accesing it, with no success:</p>
  
  <pre><code>import requests
  
  url = 'https://datos.madrid.es/egob/catalogo/205026-0-cementerios.json'
  r = requests.get(url)
  r.encoding = 'utf-8'
  r.json()
  </code></pre>
  
  <p>gives the same error.</p>
  
  <pre><code>r.text
  </code></pre>
  
  <p>returns something like:</p>
  
  <pre><code>'\x00\x00\x01\x00\x01\x00  \x00\x00\x01\x00\x18\x0 .......
  </code></pre>
  
  <p>so looks it's not decoding properly the response.</p>
  
  <p>How can I get it successfully decoded?</p>