From 9ad78f2f401cf50cc3150e7e777283b9d17cf56f Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 13 Jan 2021 02:45:12 +0000 Subject: espotify: decoding api responses using utf-8 --- media/espotify.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'media') diff --git a/media/espotify.org b/media/espotify.org index 6f001fd..99168a8 100644 --- a/media/espotify.org +++ b/media/espotify.org @@ -124,7 +124,10 @@ Let's start with an umbrella customization group: (goto-char url-http-end-of-headers) (funcall callback (let ((json-array-type 'list)) - (json-read))))))) + (thread-first + (buffer-substring (point) (point-max)) + (decode-coding-string 'utf-8) + (json-read-from-string)))))))) #+end_src So we can combine this macro with ~espotify--with-auth-token~ in a -- cgit v1.2.3