I run Neovim in combination with the R Gui (R: 3.4.1, Gui: 1.70).
When I launch R through vim, I get the following warning about my locale:
"During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_MONETARY failed, using "C"
[R.app GUI 1.70 (7375) x86_64-apple-darwin15.6.0]
WARNING: You're using a non-UTF8 locale, therefore only ASCII characters will work.
Please read R for Mac OS X FAQ (see Help) section 9 and adjust your system preferences accordingly.
"
This does not happen when I start R GUI outside of Nvim. I have made sure the startup directory contains a .Rprofile file, in which the locale is set according to instructions on the R FAQ (defaults write org.R-project.R force.LANG en_US.UTF-8).
QUESTION: How can I control the startup process of R GUI such that R reads the correct default setting for my locale?
The wrong setting interferes with the installation of some packages.
Thanks!
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ADDRESS=en_US.UTF-8
export LC_COLLATE=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_IDENTIFICATION=en_US.UTF-8
export LC_MEASUREMENT=en_US.UTF-8
export LC_MESSAGES=en_US.UTF-8
export LC_MONETARY=en_US.UTF-8
export LC_NAME=en_US.UTF-8
export LC_NUMERIC=en_US.UTF-8
export LC_PAPER=en_US.UTF-8
export LC_TELEPHONE=en_US.UTF-8
export LC_TIME=en_US.UTF-8
Sys.getenv("LANG")
> Sys.getenv('LANG')
I get
[1] "en_US.UTF-8"
It looks the same for LC_CTYPE. Yet I still get the warning about the non-UTF locale.
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
Thanks for further input.