Windows 上 RStudio 上的消息不可读

Unreadable messages on RStudio on Windows

我正在使用 RStudio 作为 R 的前端。它在 GNU/Linux 上完美运行(即使是俄语语言环境和俄语消息)。然而,在 Windows 上效果更差。 问题出在消息的字体或字符集上。

我安装了 RStudio 版本 0.99.467 (AMD64) 和 R 版本 3.2.1 (2015-06-18)。

我在开头看到以下提示(没问题,区域设置为 en_US,英语):

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

但是当我尝试做错事时,假设尝试加载未安装的包,我看到不可读的错误消息。

> library(abcdef)
Error in library(abcdef) : íåò ïàêåòà ïîä íàçâàíèåì ‘abcdef’

如何使其可读?

对了,这个问题在RStudio中出现。 RGui 工作正常(即使是俄语消息,也没有可疑字母):

> library(abcdef)
Ошибка в library(abcdef) :нет пакета под названием ‘abcdef’

(未安装软件包 "abcdef")。

不确定从哪里开始挖掘。它甚至可以解决吗?还是 RStudio 中的错误?

我认为问题在于您的系统上没有非 Unicode 俄语字符集 (1251)。

确保在控制面板 > 区域 > 管理 > 更改系统区域设置中将区域设置设置为俄语,然后重新启动系统并检查问题是否仍然存在。

或者您可以通过将 language = EN 添加到 R 的 \etc\ 目录中的 RConsole 文件(默认为 C:\Program Files\R\R-x.x.x\etc\)来将 R 语言切换为英语。