Strange locale problems in R after update to Mojave

I also encoutered a similar problem. After upgrading to Mojave, and even after clean-installing it,

  • the start message ("R is a free software...") appears in English, not in Japanese.
  • the following warning message appears
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"
  • I couldn't use Japanese characters on Rstudio.

With R-GUI and R running on a macOS terminal, everything is fine.

Adding

Sys.setlocale(category="LC_ALL", locale="ja_JP.UTF-8")

to my .Rprofile didn't solve the problem.

defaults write org.R-project.R force.LANG ja_JP.UTF-8

(at least seemingly) fixed it.