R - conversion between encodings with iconv()

25 Dec 2018

Use iconv to convert string vectors between different encodings

# Convert a character vector between encodings
iconv(x = "šibrinkuje", from = "UTF-8", to = "ASCII", sub = "?")

# sub: character string. If not NA it is used to replace any non-convertible bytes in the input. 
[ R  function  string  ]