From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sigmund Tzeng Subject: Bug: utf-8 support for ob-dot.el [9.1.14 (9.1.14-1-g4931fc-elpa @ c:/Users/sig/emacs261/.emacs.d/elpa/org-9.1.14/)] Date: Sat, 22 Sep 2018 14:10:02 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000111fa05766f9cd5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3b7V-00012Y-7q for emacs-orgmode@gnu.org; Sat, 22 Sep 2018 02:10:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3b7R-0003Sg-Mc for emacs-orgmode@gnu.org; Sat, 22 Sep 2018 02:10:19 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:45739) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g3b7Q-0003R7-1e for emacs-orgmode@gnu.org; Sat, 22 Sep 2018 02:10:17 -0400 Received: by mail-oi0-x233.google.com with SMTP id d63-v6so199706oic.12 for ; Fri, 21 Sep 2018 23:10:15 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --0000000000000111fa05766f9cd5 Content-Type: text/plain; charset="UTF-8" Hi all, When trying to render a dot file with utf-8 encoded characters, org babel complained about the encodings. I cross checked ob-go.el at line 107-108 and made an identical patch to make utf-8 dot files work: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv diff --git "a/elpa\\org-9.1.14\\ob-dot.el" "b/\\emacs261\\share\\emacs\\26.1\\lisp\\org\\ob-dot.el" index 0fe50d4..31e0a4f 100644 --- "a/elpa\\org-9.1.14\\ob-dot.el" +++ "b/\\emacs261\\share\\emacs\\26.1\\lisp\\org\\ob-dot.el" @@ -69,8 +69,6 @@ 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 subprocesses - (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))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It took me some time. Hope to see it in next version if you think it's OK. Best Regards, Sig Tzeng Emacs : GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 Package: Org mode version 9.1.14 (9.1.14-1-g4931fc-elpa @ c:/Users/sig/emacs261/.emacs.d/elpa/org-9.1.14/) --0000000000000111fa05766f9cd5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

Whe= n trying to render a dot file with utf-8 encoded=C2=A0 characters,
org babel complained about the encodings. I cross checked ob-go.el at
line 107-108 and made an identical patch to make utf-8 dot files wor= k:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv= vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
diff --g= it "a/elpa\\org-9.1.14\\ob-dot.el" "b/\\emacs261\\share\\ema= cs\\26.1\\lisp\\org\\ob-dot.el"
index 0fe50d4..31e0a4f 10064= 4
--- "a/elpa\\org-9.1.14\\ob-dot.el"
+++ &qu= ot;b/\\emacs261\\share\\emacs\\26.1\\lisp\\org\\ob-dot.el"
@= @ -69,8 +69,6 @@ This function is called by `org-babel-execute-src-block= 9;."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cmdline (or (cdr (as= sq :cmdline params))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format "-T%s" (file-name-exte= nsion out-file))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cmd (or (cd= r (assq :cmd params)) "dot"))
-=C2=A0 =C2=A0 =C2=A0(cod= ing-system-for-read 'utf-8) ;; use utf-8 with subprocesses
-= =C2=A0 =C2=A0 =C2=A0(coding-system-for-write 'utf-8)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(in-file (org-babel-temp-file "dot-"))= )
=C2=A0 =C2=A0 =C2=A0(with-temp-file in-file
=C2=A0 = =C2=A0 =C2=A0 =C2=A0(insert (org-babel-expand-body:dot body params)))
=
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It took me some = time. Hope to see it in next version if you think it's OK.
Best Regards,

Sig Tzeng
Emacs=C2=A0 : GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
=C2=A0of 2018-05-30
Package: Org mode version 9.1.14 (9.1.1= 4-1-g4931fc-elpa @ c:/Users/sig/emacs261/.emacs.d/elpa/org-9.1.14/)

--0000000000000111fa05766f9cd5--