1

After I renamed the r-file in windows explorer (ending was not changed) and open the r file in the RStudio again, the code added these red dot between every single characters as shown below.

enter image description here

I can not copy out the red dot to do a find/replace.

Are there any solution to this problem? Why does this happen?

I run RStudio on Windows 10. I am using the newest version now.

Aqqqq
  • 816
  • 2
  • 10
  • 27
  • If here is not the right place to post the question: where should I post this question? – Aqqqq Oct 14 '18 at 12:57
  • If you open your code in a text editor does it have the same display issues? – Randall Helms Oct 14 '18 at 13:10
  • That looks like an encoding issue. It appears something changed the encoding to UTF-16, but RStudio is reading it as though it is some 8 bit encoding. You could use "File | Re-open with encoding..." in RStudio to try to find one that works. – user2554330 Oct 14 '18 at 14:28

1 Answers1

0

Open the file in text editor, then refer to this answer, will solve the problem.

Aqqqq
  • 816
  • 2
  • 10
  • 27