Text Garbling in R CMD check window

As the following picture, the text garbling occurs only in the R CMD check window. How to fix it ?

I think you might need to provide a little more information about your system.

Judging by the text in your console, I assume you use a CJK language, which means that, in broadest terms, everything is complicated.

Possible debugging steps may include:

  • Try to set your character encoding to UTF-8 (or UTF-16 even?) (Due to broken characters)
  • Try to switch your R language to english (To see if the problem is related to CJK characters)
  • Run devtools::check() in a terminal R session (rather then in RStudio, to see if the problem is related to RStudio)

Thank you for reply !!

Just like you said, (I am not sure) I use the CJK language.

1) I have tried already to changing UTF-8, in the [tools]>[project option] as the following figure. Is it correct ?

2) To switch R language to English, I run the following code in the R Studio console. Is it correct ?


3) I have run the R CMD check pkg.path instead of devtools::check() then the text garbling occur in the terminal, so I run the code chcp 437 for using English. Then the text garbling vanishes in the terminal. I want to do this with respect to R studio .