But locale "Chinese" will use GBK encoding by default, how to use UTF-8 encoding
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:ggrothendi...@gmail.com] >>Sent: Tuesday, November 30, 2010 8:57 PM >>To: Xiaobo Gu >>Cc: r-help@r-project.org >>Subject: Re: FW: R encoding question >> >>On Tue, Nov 30, 2010 at 7:30 AM, Xiaobo Gu <guxiaobo1...@gmail.com> >>wrote: >>> Do you know what values should I set to the category and locale parameters >>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") >> >>and >> >>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 ______________________________________________ R-help@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.