summaryrefslogtreecommitdiff
path: root/misc/emacs/go-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'misc/emacs/go-mode.el')
-rw-r--r--misc/emacs/go-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el
index 692cabfe5..532f464ed 100644
--- a/misc/emacs/go-mode.el
+++ b/misc/emacs/go-mode.el
@@ -507,7 +507,9 @@ Replace the current buffer on success; display errors on failure."
(let ((srcbuf (current-buffer)))
(with-temp-buffer
(let ((outbuf (current-buffer))
- (errbuf (get-buffer-create "*Gofmt Errors*")))
+ (errbuf (get-buffer-create "*Gofmt Errors*"))
+ (coding-system-for-read 'utf-8) ;; use utf-8 with subprocesses
+ (coding-system-for-write 'utf-8))
(with-current-buffer errbuf (erase-buffer))
(with-current-buffer srcbuf
(save-restriction