I have some special characters in my UTF-8 .R file and the attempt to run code as a file in the R command line returns unexpected INCOMPLETE_STRING
.
Meanwhile, the code runs okay line by line, say, in RStudio or Eclipse.
I suggest I need to change the locale via Sys.setlocale(locale=)
, but all my attempts (including SO's answers) to find the right locale
parameter for UTF-8 gave OS reports request to set locale to "UTF-8" cannot be honored
. I can set up something like Sys.setlocale(locale="English")
, but it doesn't help.
How to set up "UTF-8" on Windows?