set_file_enc converts files between encodings. After converting, it is suggested using import functions from readr, i.e. read_csv, read_lines, etc.

set_file_enc(path, from = "", to = "UTF-8")

Arguments

path

Either a path to a file, or a directory under which all files are to be converted

from

A character string describing the current encoding. By default, uses the encoding detected by readr::guess_encoding with highest probability

to

A character string describing the target encoding, default to UTF-8.