Re: [R] A question about JGR [was about encoding]

From: Prof Brian Ripley <>
Date: Wed 10 May 2006 - 02:13:59 EST

On Tue, 9 May 2006, ronggui wrote:

> I use R 2.3.0 under windows.
>> Sys.getlocale()
> [1] "LC_COLLATE=Chinese_People's Republic of
> China.936;LC_CTYPE=Chinese_People's Republic of
> China.936;LC_MONETARY=Chinese_People's Republic of
> China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of China.936"
>> localeToCharset()
> [1] "CP936"
> Now I want to use JGR,which uses UTF-8 encoding.
> So when I use save.image function to save something containg Chinese
> character with R,and then load into JGR, the Chinese character will
> not display correctly.Of course,I can use iconv to convert the
> character making it readable.But is there any better way to this?

Yes, use a better OS!

Otherwise, Windows has no concept of UTF-8 locales, so if JGR expects one, the problem is that JGR needs to do the conversions: it is R that is running natively and JGR which is `foreign' here.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed May 10 02:18:41 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 10 May 2006 - 04:09:59 EST.

Mailing list information is available at Please read the posting guide before posting to the list.