如何在 RStudio 中检测非 UTF-8 编码

Chr*_*oph 5 rstudio

我有一个像

a <- 1
# A very long comment, perhaps copy paste from somewhere containing the word ?t.
Run Code Online (Sandbox Code Playgroud)

我想搜索非 UTF-8 编码。我怎样才能在 RStudio 中做到这一点?

Chr*_*oph 6

我意识到,答案非常简单:只需转到 Edit => Find (Strg + F) 并在搜索栏中搜索[^\x00-\x7F]+ with enabledRegex字段。