readr icon indicating copy to clipboard operation
readr copied to clipboard

Error in if (stringi::stri_enc_isascii(lines)) { : the condition has length > 1

Open struckma opened this issue 10 months ago • 0 comments

Hello, thank you for your great work about the tidyverse, I really like it. I am so sorry, but I've to report a small bug, just call:

> readr::guess_encoding(list("a", "b"))
Error in if (stringi::stri_enc_isascii(lines)) { : 
  the condition has length > 1

The reason is in the referred line 35 of encoding.R in the current main branch:

if (stringi::stri_enc_isascii(lines)) {

should read

if (all(stringi::stri_enc_isascii(lines))) {

Thank you for fixing,

Stephan

struckma avatar Nov 27 '24 14:11 struckma