You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble with utf-8 characters in results from sparql-mode. Here's a query that includes the string "cm²" in the result, running e.g. in eshell:
Here's a small change to sparql-handle-results that seems to fix the issue. I've used (car default-process-coding-system) to hopefully obtain the utf-8 choice in a reasonable way.
(defun sparql-handle-results (status &optional output-buffer)
"Handles the result that comes back from url-retrieve for a
SPARQL query."
(when (zerop (buffer-size))
(setq mode-name "SPARQL[error]")
(error "URL '%s' is not accessible"
(url-recreate-url url-current-object)))
(let ((results-buffer (current-buffer))
(response (url-http-parse-response)))
(with-current-buffer output-buffer
(let ((buffer-read-only nil))
(if (and (<= 200 response) (<= response 299))
; here:
(progn (url-insert results-buffer)
(decode-coding-region (point-min) (point-max) (car default-process-coding-system)))
;
(insert-buffer-substring results-buffer))
(setq mode-name "SPARQL[finished]")))))
I'm having trouble with utf-8 characters in results from sparql-mode. Here's a query that includes the string "cm²" in the result, running e.g. in eshell:
curl "https://endpoint.dexpi.org/information_model/query?query=describe%20<http://sandbox.dexpi.org/informationmodel/ScaleCentimetreSquared>"
Executing the describe from a sparql-mode buffer, I see this -- uninterpretable characters:
"cm\302\262"
I have utf-8 as default character set. Emacs 27.2 on Windows, sparql-mode 4.0.2.
The text was updated successfully, but these errors were encountered: