Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress warnings generated by search in the Viewer #1806

Closed
etienne-s opened this issue Dec 5, 2017 · 2 comments
Closed

Suppress warnings generated by search in the Viewer #1806

etienne-s opened this issue Dec 5, 2017 · 2 comments

Comments

@etienne-s
Copy link

@etienne-s etienne-s commented Dec 5, 2017

Sometimes when using RStudio I get a bunch of warnings in the console. They look like that:

Warning messages:
1: In grepl(paste("\\Q", search, "\\E", sep = ""), column, perl = TRUE,  :
  input string 2958 is invalid UTF-8
2: In grepl(paste("\\Q", search, "\\E", sep = ""), column, perl = TRUE,  :
  input string 3002 is invalid UTF-8
3: In grepl(paste("\\Q", search, "\\E", sep = ""), column, perl = TRUE,  :
  input string 3289 is invalid UTF-8
4: In grepl(paste("\\Q", search, "\\E", sep = ""), column, perl = TRUE,  :
  input string 3582 is invalid UTF-8
5: In grepl(paste("\\Q", search, "\\E", sep = ""), column, perl = TRUE,  :
  input string 3648 is invalid UTF-8

I realized they come from the data viewer, more precisely they occur when searching through badly encoded text data. Minimal example:

u <- rawToChar(as.raw(c(0x63, 0x61, 0x66, 0xe9)))
Encoding(u) <- "UTF-8"
View(u)
# Search anything using either the global (top-right) search or the column search.
# Then type any command in the console.

These warnings are quite confusing for the user, especially because they are printed only when the next command is entered.

Would it be possible to suppress them?

@dfalty dfalty added the verified label Dec 5, 2017
@dfalty
Copy link

@dfalty dfalty commented Dec 5, 2017

Verified on 1.1.393. Thanks for the report!

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Nov 26, 2019

Can't repro any more on 1.3.624 (and haven't had any reports in about two years).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants