[kepler-users] Different behavior of an R script in R terminal and R actor of Kepler

Josep Maria Campanera Alsina campaxic at gmail.com
Thu Aug 30 02:47:22 PDT 2012


Hi all,
I'm working with words with accents (like Artà or Església).

My locale system is set properly as ca_ES.UTF-8 and when I launch R
from terminal it works nicely:

> Sys.getlocale(category="LC_ALL")
[1] "ca_ES.UTF-8/ca_ES.UTF-8/ca_ES.UTF-8/C/ca_ES.UTF-8/ca_ES.UTF-8"
> municipi<-"Artà"
> municipi
[1] "Artà"

But when I run the same script with R actor in Kepler 2.3 the behavior
changes unexpectedly

> Sys.getlocale(category="LC_ALL")
[1] "C"
> municipi<-"Artà"
> municipi
[1] "Art\210"

I've tried to fix the locale settings unsuccesfuly by means of:

1) run the following command at the beginning of my script:
Sys.setlocale(category="LC_CTYPE",locale="ca_ES.UTF-8"). Kepler stops
with an error.

2) edit ~/.Renviron and introduce LANG=ca_ES.UTF-8. Then Kepler stops
with initially at running the script.

It seems that R actor  cannot work with locales different from "C"
since I've switched to en_US.UTF-8 and it doesn't work neither. Any
clue how to fix that? All comments welcome.

Find attached the small workflow to test that.

All the best,

Josep Maria Campanera,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcampa.kar
Type: audio/midi
Size: 8400 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20120830/5d2f043f/attachment.kar>


More information about the Kepler-users mailing list