Czech encoding in R

前端 未结 2 1633
甜味超标
甜味超标 2021-01-19 04:12

I have installed RStudio on a new computer, and has developed encoding issues. When I type accented text in console (no file writing or reading involved, just plain console)

2条回答
  •  一个人的身影
    2021-01-19 05:05

    For the benefit of posterity - I overcame my problem by setting code page to 1250 (while keeping US English as my language).

    if (.Platform$OS.type == 'windows') {
      Sys.setlocale(category = 'LC_ALL','English_United States.1250')
    } else {
      Sys.setlocale(category = 'LC_ALL','en_US.UTF-8')
    }
    

    in the .Rprofile

提交回复
热议问题