peek_iconv {fpeek}R Documentation

Converts encoding of characters

Description

Read a file, convert the encoding of characters and print the result.

Usage

peek_iconv(path, from, to = "UTF-8", newfile = NULL)

Arguments

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.

Examples

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)


[Package fpeek version 0.1.2 Index]