[R] special characters in linux using dev.print

Prof Brian Ripley
Mon, 08 Oct 2007 06:35:52 -0000

How exactly are you doing this (see the footer of your message for the
input we asked for)?  What is your 'minimal, self-contained, reproducible
code', and where is the output of sessionInfo()?

The plusminus symbol is in the symbol font, and it is also in some text
encodings, so there are several routes you could have taken. For example,

pdf()
plot(1:10)
text(4,5,"\u00B1")

works for me in a UTF-8 locale.  (It works in any locale that has the
symbol in its encoding.)


On Mon, 8 Oct 2007, Alexander.Herr at csiro.au wrote:

> Hi List,
>
> I want to print ? in a lattice graph label. This works in windows, but
> the linux version has problems - it cannot translate the character.
> Error is "invalid input in mbcsToLatin1".
>
> I use the standard encoding and also
dev.print(file="filename",dev=pdf,
> encoding="PDFDoc.enc")
>
> I am afraid I don't know enough about the linux font encodings to
figure
> out what to use. So I am hoping others using ? have already come across
> the trap.
>
> Any help appreciated.
> Thanks
> Herry
>
> Using x86_64 opensuse 10.2, R2.5.0 (2007-04-23)
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595