Script with utf-8 text runs differently from RStudio and command line in Windows

后端 未结 2 1231
情书的邮戳
情书的邮戳 2021-01-03 02:09

I\'m working with files containing text in Hindi and parsing them. I wrote my code in Rstudio and executed it without many issues. But now, I need to execute the same script

2条回答
  •  囚心锁ツ
    2021-01-03 02:59

    The right answer is that you should run Rscript with the option --encoding=file encoding

    There is no need to set locale, and as you probably found out, it doesn't work anyway. If your file is UTF-8: Rscript.exe --encoding=UTF-8 file.R

提交回复
热议问题