[R-SIG-Mac] OS reports request to set locale to "en_US.utf8"...

Simon Urbanek simon.urbanek at r-project.org
Fri May 15 16:28:44 CEST 2015


> On May 14, 2015, at 9:32 PM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote:
> 
> Hi,
> 
> I'm working under Mac OS X 10.10.3 and installed R from source (see
> below for more information). Hen compiling a package I receive a
> warning about UTF-8 not being available:
> 
> * checking package subdirectories ... OK
> * checking R files for non-ASCII characters ... OK
> * checking R files for syntax errors ... WARNING
> Warning in Sys.setlocale("LC_CTYPE", "en_US.utf8") :
>  OS reports request to set locale to "en_US.utf8" cannot be honored
> * checking whether the package can be loaded ... OK
> * checking whether the package can be loaded with stated dependencies ... OK
> * checking whether the package can be unloaded cleanly ... OK
> 
> I don't know any place where I call Sys.setlocale() and if I set the
> locale to "C" in .Rprofile, I still receive the same message (and the
> R admin manual is not very detailed about this case)
> 
> How can I fix that? (Let me know if you need more information)
> 

en_US.utf8 doesn’t exist on OS X - the corresponding locale name there is en_US.UTF-8

You may want to set R_ENCODING_LOCALES to the values that are supported by your OS, this is what I’m using on the CRAN machine:

R_ENCODING_LOCALES="latin1=en_US.ISO8859-1:latin2=cs_CZ.ISO8859-2:UTF-8=en_US.UTF-8"

Cheers,
Simon



> Below is the output of sessionInfo().
> 
> Thanks & cheers,
> Marius
> 
> 
> sessionInfo()
> R version 3.2.0 (2015-04-16)
> Platform: x86_64-apple-darwin14.3.0 (64-bit)
> Running under: OS X 10.10.3 (Yosemite)
> 
> locale:
> [1] C
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> loaded via a namespace (and not attached):
> [1] compiler_3.2.0 tools_3.2.0
>> 
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 



More information about the R-SIG-Mac mailing list