From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: DITAA and Unicode characters [babel] Date: Mon, 25 Apr 2011 13:13:41 -0600 Message-ID: <87liyyywii.fsf@gmail.com> References: <20110424233845.GA29862@soloJazz.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEREJ-0005u6-Nz for emacs-orgmode@gnu.org; Mon, 25 Apr 2011 15:13:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEREC-0001Ui-7A for emacs-orgmode@gnu.org; Mon, 25 Apr 2011 15:13:55 -0400 Received: from mail-px0-f179.google.com ([209.85.212.179]:53710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEREC-0001UX-2V for emacs-orgmode@gnu.org; Mon, 25 Apr 2011 15:13:48 -0400 Received: by pxi2 with SMTP id 2so2193858pxi.38 for ; Mon, 25 Apr 2011 12:13:46 -0700 (PDT) In-Reply-To: <20110424233845.GA29862@soloJazz.com> (Juan Pechiar's message of "Sun, 24 Apr 2011 20:38:45 -0300") 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: Juan Pechiar Cc: emacs-orgmode@gnu.org Hi Juan, Juan Pechiar writes: > 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 > Thanks for catching questions in these other forums. > > 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 ... > I just pushed up a change to ob-ditaa which adds a new header argument, namely :java through which options can be passed to the java command. With that patch the following should work #+begin_src ditaa :file ... :cmdline -e utf-8 -r -v :java -Dfile.encoding=UTF-8 ... #+end_src > > 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. > Now that there is a :java header argument for ditaa code, the following could be put in a user's init file to set this flag for *all* ditaa code run on their system. #+begin_src emacs-lisp (push '(:java . "-Dfile.encoding=UTF-8") org-babel-default-header-args:ditaa) #+end_src I wonder if there would be any downside to adding this as a default value? This could be added to `org-babel-default-header-args:ditaa' in ob-ditaa.el. Best -- Eric > > Regards, > .j. > -- Eric Schulte http://cs.unm.edu/~eschulte/