aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-01-02 00:22:06 +0530
committerArun Isaac2022-01-02 00:22:06 +0530
commit464b75248b42986cbf4150d11c9e080d0c99f78c (patch)
tree3aeaf3df6a8d53a72d3494b54cf594f6d6e4e971
parent25febafd9898badaa89aaec48f082c86baf69eda (diff)
downloadkolam-464b75248b42986cbf4150d11c9e080d0c99f78c.tar.gz
kolam-464b75248b42986cbf4150d11c9e080d0c99f78c.tar.lz
kolam-464b75248b42986cbf4150d11c9e080d0c99f78c.zip
kolam: Read JSON using UTF-8 encoding.
* kolam/http.scm (graphql-http-response): Set JSON port encoding to UTF-8 before reading.
-rw-r--r--kolam/http.scm1
1 files changed, 1 insertions, 0 deletions
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")