peek_iconv {fpeek} | R Documentation |
Read a file, convert the encoding of characters and print the result.
peek_iconv(path, from, to = "UTF-8", newfile = NULL)
path |
file path |
from |
the code set in which the input is encoded. |
to |
the code set to which the output is to be converted. |
newfile |
result file. Default to NULL. If null the result will be print in the R console, otherwise a file is produced containing the result. |
la_cigale <- system.file(package = "fpeek", "datafiles", "cigfou-ISO-8859-1.txt") peek_head(la_cigale) peek_iconv(la_cigale, from = "ISO-8859-1", to = "UTF-8") newfile <- tempfile() peek_iconv(la_cigale, from = "ISO-8859-1", to = "UTF-8", newfile = newfile) peek_head(newfile, n = 10)