Re: [R] New problem printing °C in plots
Patrick Connolly
p.connolly at hortresearch.co.nz
Wed Feb 2 02:27:41 CET 2005
On Tue, 01-Feb-2005 at 11:33PM +0000, Prof Brian Ripley wrote:
|> That this prints as an octal escape was always the intention: it is your
|> OS that is telling R that it is not a printable character. What locale
|> are you in? For me
|>
|> 1) In en_GB this works (correct, as that is charset ISO-8859-1)
|> 2) In C, I get "25\260C" (correct, as that is not an ASCII char)
|>
|> My guess is that you have R running in a C locale and emacs in a UTF-8
|> locale, since the UTF-8 representation of that symbol is c2b0, in octal
|> \302\260. If that is what is going on, 1.8.1 would have been equally
|> confused (it might have printed UTF-8, but it would not plot it), so I
1.8.1 was not confused. Maybe confused to a similar degree, but
confused in a different way. It prints to screen and it used to plot
to a postscript device fine. I seem to remember that it didn't plot
to an X11 device correctly.
Now, X11 and postscript both have the extra character.
[...]
|>
|> Note that at least one set of RPMs now runs R in the C locale (but that's
|> not part of R per se). If you run in en_NZ I think you will find R works
|> to your taste. The good news is that R-devel already supports en_NZ.utf8,
|> and so 2.1.0 will in a couple of months.
I've found that simply using the string "\260C" instead of Emacs's
trick works both in X11 and postscript, so I'll survive until then --
though I kind of miss that bit of WYSIWYG.
Thanks
--
Patrick Connolly
HortResearch
Mt Albert
Auckland
New Zealand
Ph: +64-9 815 4200 x 7188
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
I have the world`s largest collection of seashells. I keep it on all
the beaches of the world ... Perhaps you`ve seen it. ---Steven Wright
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
More information about the R-help
mailing list