From ee21700bba09d8f524eabe94358fbf5873e73ed0 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Wed, 20 Feb 2013 12:04:46 +0100 Subject: [PATCH] * async.el: Issue #7 Apply sabof patch from github; Fix processing non--latin chars. (async--receive-sexp):do it. (async--insert-sexp): do it. --- async.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/async.el b/async.el index 87fec2f81..7eb756857 100644 --- a/async.el +++ b/async.el @@ -118,7 +118,8 @@ as follows: (set (make-local-variable 'async-callback-value-set) t)))))) (defun async--receive-sexp (&optional stream) - (let ((sexp (base64-decode-string (read stream)))) + (let ((sexp (decode-coding-string (base64-decode-string + (read stream)) 'utf-8-unix))) (if async-debug (message "Received sexp {{{%s}}}" (pp-to-string sexp))) (setq sexp (read sexp)) @@ -129,6 +130,7 @@ as follows: (defun async--insert-sexp (sexp) (prin1 sexp (current-buffer)) ;; Just in case the string we're sending might contain EOF + (encode-coding-region (point-min) (point-max) 'utf-8-unix) (base64-encode-region (point-min) (point-max) t) (goto-char (point-min)) (insert ?\") (goto-char (point-max)) (insert ?\" ?\n)) -- 2.39.2