I want to open R with UTF-8 input encoding for graphs, and I cannot get it to work.
This is my (short) program in plot.R
plot(1:5, xlab="ř")
And this is what I get (I, unfortunately, have to use the old version of R)
~/$ R <plot.R --no-save --encoding="utf-8" R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > plot(1:5, xlab="ř") Warning messages: 1: In title(...) : conversion failure on 'ř' in 'mbcsToSbcs': dot substituted for <c5> 2: In title(...) : conversion failure on 'ř' in 'mbcsToSbcs': dot substituted for <99> 3: In title(...) : conversion failure on 'ř' in 'mbcsToSbcs': dot substituted for <c5> 4: In title(...) : conversion failure on 'ř' in 'mbcsToSbcs': dot substituted for <99> >
Googling everything related to R is challenging, so I ask here. Am I doing something wrong? Or is it just an old version of R?
edit: it seems that the error is not in the input encoding, but in something else - when I write a letter like \u0159 , it does the same. This is probably something with PDF fonts, I think.
To answer Joran: I really don't know the intricacies of R output devices; my R default outputs in PDF. I have to use Fedora release 8. (again, ancient as well as R version)
source share