From 464b75248b42986cbf4150d11c9e080d0c99f78c Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 2 Jan 2022 00:22:06 +0530 Subject: kolam: Read JSON using UTF-8 encoding. * kolam/http.scm (graphql-http-response): Set JSON port encoding to UTF-8 before reading. --- kolam/http.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/kolam/http.scm b/kolam/http.scm index 9efbd60..fc60f0c 100644 --- a/kolam/http.scm +++ b/kolam/http.scm @@ -120,6 +120,7 @@ read from PORT. Raise errors, if any." (< (response-code response) 300)) (error "GraphQL query failed with non-2xx status code:" response (get-string-all port))) + (set-port-encoding! port "utf-8") (let ((response-alist (json->scm port))) (cond ((assoc-ref response-alist "errors") -- cgit v1.2.3