summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSigmund Tzeng <sig.tzeng@gmail.com>2018-09-29 08:44:39 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-09-29 08:44:39 +0200
commit0d0cd9694f426e0482d42553788cefd51712880c (patch)
treeff27569a027d4f58c45c67379927d3b07f7b80b3
parente22d32b023b45d848fcc45c403e91a64febd213d (diff)
downloadorg-mode-0d0cd9694f426e0482d42553788cefd51712880c.tar.gz
ob-dot: Fix error with utf-8 encoded dot files
* lisp/ob-dot.el (org-babel-execute:dot): Add utf-8 support. When trying to render a dot file with utf-8 encoded characters, Org Babel complains about the encodings. This patch makes utf-8 dot files work. TINYCHANGE
-rw-r--r--lisp/ob-dot.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ob-dot.el b/lisp/ob-dot.el
index 31e0a4f..51b26e5 100644
--- a/lisp/ob-dot.el
+++ b/lisp/ob-dot.el
@@ -69,6 +69,8 @@ This function is called by `org-babel-execute-src-block'."
(cmdline (or (cdr (assq :cmdline params))
(format "-T%s" (file-name-extension out-file))))
(cmd (or (cdr (assq :cmd params)) "dot"))
+ (coding-system-for-read 'utf-8) ;use utf-8 with sub-processes
+ (coding-system-for-write 'utf-8)
(in-file (org-babel-temp-file "dot-")))
(with-temp-file in-file
(insert (org-babel-expand-body:dot body params)))