utf8 is an R package for manipulating and printing UTF-8 text that fixes multiple bugs in R’s UTF-8 handling.
utf8 is available on CRAN. To install the latest released version, run the following command in R:
To install the latest development version, run the following:
Use as_utf8()
to validate input text and convert to UTF-8 encoding. The function alerts you if the input text has the wrong declared encoding:
Use utf8_normalize()
to convert to Unicode composed normal form (NFC). Optionally apply compatibility maps for NFKC normal form or case-fold.
install.packages('utf8')