Guess the file encoding for a vector of filenames or filepaths
Source:R/guess_file_encoding.R
guess_file_encoding.Rd
This function will guess the file encoding of a vector of filenames or
filepaths and return the file encoding as a string. It primarily uses
stringi::stri_enc_detect()
to guess the encoding. Additionally, it
searches for known CP850 and CP1252 characters and will return the
appropriate encoding if found, because ICU/stringi cannot detect them. If a
file is a binary file, it will return "binary"
. If a file is inaccessible
it will return NA
for that element.