[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Can't write accents in R graphics
From: |
Sebastien Vauban |
Subject: |
[O] Can't write accents in R graphics |
Date: |
Thu, 05 Dec 2013 11:33:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
#+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