Emacs Lisp tip:

1. url-retrieve ignores the Content-type header, specifically the charset. The buffer is not decoded at all, as far as I can see.

2. You cannot decode *within* the buffer url-retrieve gives you, but you can decode the buffer (or better, the body of the response) into *another* buffer.

The latter point gave me hours of frustration. Trying to decode the buffer back into itself produces no error, it silently does nothing. 🙄