From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Pechiar Subject: DITAA and Unicode characters [babel] Date: Sun, 24 Apr 2011 20:38:45 -0300 Message-ID: <20110424233845.GA29862@soloJazz.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QE8tA-00021a-Hc for emacs-orgmode@gnu.org; Sun, 24 Apr 2011 19:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QE8t9-00058V-BI for emacs-orgmode@gnu.org; Sun, 24 Apr 2011 19:38:52 -0400 Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:44677) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QE8t9-00058P-3t for emacs-orgmode@gnu.org; Sun, 24 Apr 2011 19:38:51 -0400 Received: from r186-48-225-228.dialup.adsl.anteldata.net.uy ([186.48.225.228] helo=iso.palmas.net) by box519.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1QE8t6-000701-4b for emacs-orgmode@gnu.org; Sun, 24 Apr 2011 17:38:48 -0600 Content-Disposition: inline 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Out of the box, ob-ditaa does not work with non-ascii characters. I looked into the problem in order to answer a user request on StackOverflow (yes, there are org-mode questions posted there instead of here!). http://stackoverflow.com/questions/5758498/problem-with-ditaa-and-foreign-characters-in-org-mode In order for ditaa to accept UTF-8 characters in the input file, it must be called with the corresponding property setting: java -Dfile.encoding=UTF-8 -jar path/to/ditaa.jar ... Attached is a dirty patch for hard-coding this property setting. I don't know what the proper way of setting this property should be: - somehow setting it system-wide (any Java guru out there?). - or adding a customization to ob-ditaa.el for this property - or adding magic to ob-ditaa so that the same encoding of the buffer gets set to this Java property I can help with the implementation if given some feedback on the above options. Regards, .j. --0OAP2g/MAC+5xKAE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ob-ditaa.el.diff" diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el index 20b5c42..dc17a4d 100644 --- a/lisp/ob-ditaa.el +++ b/lisp/ob-ditaa.el @@ -55,7 +55,7 @@ This function is called by `org-babel-execute-src-block'." (cdr (assoc :file params)))) (cmdline (cdr (assoc :cmdline params))) (in-file (org-babel-temp-file "ditaa-")) - (cmd (concat "java -jar " + (cmd (concat "java -Dfile.encoding=UTF-8 -jar " (shell-quote-argument (expand-file-name org-ditaa-jar-path)) " " cmdline --0OAP2g/MAC+5xKAE--