Merge pull request #298 from HyunggyuJang/patch-1

Encode config as utf-8 during setup in khoj.el. This will allow utf-8 encoded files etc to be passed in config
This commit is contained in:
Debanjum 2023-07-18 17:54:11 -07:00 committed by GitHub
commit 5f2be2a9bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -609,7 +609,7 @@ CONFIG is json obtained from Khoj config API."
;; POST provided config to khoj server
(let ((url-request-method "POST")
(url-request-extra-headers '(("Content-Type" . "application/json")))
(url-request-data (json-encode-alist config))
(url-request-data (encode-coding-string (json-encode-alist config) 'utf-8))
(config-url (format "%s/api/config/data" khoj-server-url)))
(with-current-buffer (url-retrieve-synchronously config-url)
(buffer-string)))