Learn R Programming

tm (version 0.5-3)

convert_UTF_8: Convert Encoding to UTF-8

Description

Convert the encoding of a character or text document to UTF-8.

Usage

convert_UTF_8(x, from = "", sub = NA)

Arguments

x
A character or text document.
from
A character string describing the current encoding.
sub
A character string. If not 'NA' it is used to replace any non-convertible bytes in the input.

Value

  • The character or text document x converted to UTF-8 encoding.

Details

This function internally uses iconv for conversion, and the arguments from and sub are passed over.

See Also

iconv

Use getTransformations to list available transformation (mapping) functions.

Examples

Run this code
data("crude")
convert_UTF_8(crude[[1]])

Run the code above in your browser using DataLab