[R] FW: R encoding question

Xiaobo Gu guxiaobo1982 at gmail.com
Tue Nov 30 15:09:09 CET 2010

But locale "Chinese" will use GBK encoding by default, how to use UTF-8

I have tried the following, neither of them works.

Sys.setlocale(locale = "zh_CN.UTF-8") 

Sys.setlocale(category = "LC_CTYPE", locale= "zh_CN.UTF-8")

Xiaobo Gu

>>-----Original Message-----
>>From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com]
>>Sent: Tuesday, November 30, 2010 8:57 PM
>>To: Xiaobo Gu
>>Cc: r-help at r-project.org
>>Subject: Re: FW: R encoding question
>>On Tue, Nov 30, 2010 at 7:30 AM, Xiaobo Gu <guxiaobo1982 at gmail.com>
>>> Do you know what values should I set to the category and locale
>>in order to use UTF-8 encoding in a Chinese Windows XP SP3 environment?
>>> Sys.setlocale(category = "LC_ALL", locale = "")
>>Its OS dependent but you could try:
>>Sys.setlocale(locale = "Chinese")
>>Sys.setlocale(locale = "")
>>to set it back.
>>Statistics & Software Consulting
>>GKX Group, GKX Associates Inc.
>>tel: 1-877-GKX-GROUP
>>email: ggrothendieck at gmail.com

More information about the R-help mailing list