Liviu Andronic
2009-Aug-21 07:50 UTC
[Rd] sessionInfo() fails to correctly detect locale settings
Dear R devels Yesterday I was slightly surprised to notice that R incorrectly detected some of the locale settings. I am not sure whether this is important, but I preferred to drop a message. In the R output below, some entries that should have been "en_GB.UTF-8" are presented as "C". Regards Liviu> sessionInfo()R version 2.9.1 (2009-06-26) x86_64-pc-linux-gnu locale: LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] fortunes_1.3-6 relimp_1.0-1 loaded via a namespace (and not attached): [1] tcltk_2.9.1 liviu at debian-liv:~$ locale LANG=en_GB.UTF-8 LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL -- Do you know how to read? http://www.alienetworks.com/srtest.cfm Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Peter Dalgaard
2009-Aug-21 08:19 UTC
[Rd] sessionInfo() fails to correctly detect locale settings
Liviu Andronic wrote:> Dear R devels > Yesterday I was slightly surprised to notice that R incorrectly > detected some of the locale settings. I am not sure whether this is > important, but I preferred to drop a message. In the R output below, > some entries that should have been "en_GB.UTF-8" are presented as "C". > Regards > LiviuR only sets the entries it needs. In particular, you most definitely do not want LC_NUMERIC automatically set to your current locale, as this may cause system I/O to use "," instead of "." in numbers.>> sessionInfo() > R version 2.9.1 (2009-06-26) > x86_64-pc-linux-gnu > > locale: >LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C> > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] fortunes_1.3-6 relimp_1.0-1 > > loaded via a namespace (and not attached): > [1] tcltk_2.9.1 > > > liviu at debian-liv:~$ locale > LANG=en_GB.UTF-8 > LC_CTYPE="en_GB.UTF-8" > LC_NUMERIC="en_GB.UTF-8" > LC_TIME="en_GB.UTF-8" > LC_COLLATE="en_GB.UTF-8" > LC_MONETARY="en_GB.UTF-8" > LC_MESSAGES="en_GB.UTF-8" > LC_PAPER="en_GB.UTF-8" > LC_NAME="en_GB.UTF-8" > LC_ADDRESS="en_GB.UTF-8" > LC_TELEPHONE="en_GB.UTF-8" > LC_MEASUREMENT="en_GB.UTF-8" > LC_IDENTIFICATION="en_GB.UTF-8" > LC_ALL> > > >-- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907