[R] A question about encoding

ronggui ronggui.huang at gmail.com
Tue May 9 17:10:19 CEST 2006


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?

Thanks.

--
»ÆÈÙ¹ó
Deparment of Sociology
Fudan University




More information about the R-help mailing list