branch: master
commit ee21700bba09d8f524eabe94358fbf5873e73ed0
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
* 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 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/async.el b/async.el
index 87fec2f..7eb7568 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))