From: Juan Pechiar <juan@pechiar.com>
To: emacs-orgmode@gnu.org
Subject: DITAA and Unicode characters [babel]
Date: Sun, 24 Apr 2011 20:38:45 -0300 [thread overview]
Message-ID: <20110424233845.GA29862@soloJazz.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
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.
[-- Attachment #2: ob-ditaa.el.diff --]
[-- Type: text/x-diff, Size: 506 bytes --]
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
next reply other threads:[~2011-04-24 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-24 23:38 Juan Pechiar [this message]
2011-04-25 19:13 ` DITAA and Unicode characters [babel] Eric Schulte
2011-04-26 0:27 ` Juan Pechiar
2011-04-26 0:58 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110424233845.GA29862@soloJazz.com \
--to=juan@pechiar.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).