RStudio-2021.09.1-372版本,在console中输入dir()可以正常显示中文。
dir("D:/test", full.names = T)
[1] "D:/test/中文" "D:/test/中文.txt"
然而,RStudio-2021.09.2-382和RStudio-2022.02.0-preview-392版本,在console中输入dir()无法正常显示中文。
dir("D:/test", full.names = T)
[1] "D:/test/涓枃" "D:/test/涓枃.txt"
不知道该如何解决。
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)China.936
[2] LC_CTYPE=Chinese (Simplified)China.936
[3] LC_MONETARY=Chinese (Simplified)China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.2 wbaddins_2021.11.22 wbrmd_2021.12.06 htmltools_0.5.1.1
[5] tools_4.1.2 yaml_2.2.1 rmarkdown_2.11 knitr_1.33
[9] xfun_0.23 digest_0.6.27 rlang_0.4.11 evaluate_0.14