R: sf_iconv

sf_iconv {stringfish} | R Documentation

## sf_iconv

### Description

Converts encoding of one character vector to another

### Usage

    sf_iconv(x, from, to)

### Arguments

`x` | An alt-rep object
`from` | the encoding to assume of 'x'
`to` | the new encoding

### Details

This is an analogue to the base R function 'iconv'. It converts a string from one encoding (e.g. latin1 or UTF-8) to another

### Value

the converted character vector as a stringfish vector

### See Also

iconv

### Examples

    x <- "fa\xE7ile"
    Encoding(x) <- "latin1"
    sf_iconv(x, "latin1", "UTF-8")

[Package stringfish version 0.12.1 Index]