Encoding issue with debugSource

Hello,
I am running RStudio Version 1.1.453 and R 3.4.3.
Suppose I save a small file just containing the following line:

viña <- data.frame(viñedo = c(1, 2))

with any name. No problem, I can run the code and variables are created with the correct names.
I can check the Source on Save box and everything still works OK.

But if I try to set a breakpoint, I get the following error:

> debugSource('C:/Users/Usuario/Dropbox/R/Empty/debug-source-error.R', encoding = 'UTF-8', echo=TRUE)
Error in parse(filename, encoding = encoding) : 
  C:/Users/Usuario/Dropbox/R/Empty/debug-source-error.R:1:3: unexpected input
1: viñ
      ^

It's not a big issue, I can go back to using usual ASCII characters for my variables, but over the versions the encoding issues had gotten so much better that I thought they were gone !

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3 yaml_2.1.18

Thanks for your awesome work !
Antoine

2 Likes