emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Can't write accents in R graphics
Date: Thu, 05 Dec 2013 11:33:58 +0100	[thread overview]
Message-ID: <86vbz3si21.fsf@somewhere.org> (raw)

#+TITLE:     ECM Process Coding System
#+PROPERTY:  eval yes
#+PROPERTY:  exports both
#+PROPERTY:  cache no

* Problem

  I can't write accents in graphic titles (nor legends).

* Settings

  After Googling (a lot), I always come back to the same set of solutions:

  - Adding the following in my ~.emacs~ file:

    #+begin_src emacs-lisp
    (setq process-coding-system-alist '(("R.*" . utf-8-unix)))
    #+end_src

    #+begin_src emacs-lisp
    (add-hook 'ess-R-post-run-hook
              (lambda () (set-buffer-process-coding-system
                          'utf-8-unix 'utf-8-unix)))
    #+end_src

  - Setting the process coding system in the =*R*= buffer:

    #+begin_src emacs-lisp
    M-x set-buffer-process-coding-system RET utf-8-unix RET utf-8-unix RET
    #+end_src

  None of those does work for me, from an Org file...

* Example

** Text

   Print a string does always work, in the Org buffer, and in the export.

   #+begin_src R
   print("Élève")
   #+end_src

   #+results:
   : Élève

** Graph

   But adding a title with accents never does:

   #+header: :file ecm-R-coding-system.png
   #+begin_src R :results graphics :width 240 :height 240
   x <- 0:12
   plot(sin(x/2))
   title("Élève")
   #+end_src

   #+results:
   [[file:ecm-R-coding-system.png]]

* Observations

  You can see a demo of (some of) the tests I made on
  http://screencast.com/t/7Nz87zuqiz.

  Maybe the problem is not related neither to Org, nor ESS, as I see that
  =sessionInfo()= outputs French stuff.

Maybe some of the R users here could share their experience with the "coding
system" configuration?

Best regards,
  Seb

-- 
Sebastien Vauban

             reply	other threads:[~2013-12-05 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 10:33 Sebastien Vauban [this message]
2013-12-05 19:15 ` Can't write accents in R graphics John Hendy
2013-12-06 11:19   ` [babel] Can't write accented characters " Sebastien Vauban
2013-12-10 18:47     ` Sebastien Vauban
2013-12-10 21:08       ` Christian Moe
2013-12-11  8:48         ` Sebastien Vauban
2013-12-15 20:48   ` Can't write accents " Bernd Haug
     [not found] <CACJpEk2aXhDBnY4WuvcaBkHuzB8_inZiEKPedMYvAvSO2UAfDA@mail.gmail.com>
2013-12-05 18:43 ` Sebastien Vauban

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=86vbz3si21.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).