utf8
utf8 is an R package for manipulating and printing UTF-8 text that fixes multiple bugs in R’s UTF-8 handling.
Installation
Stable version
utf8 is available on CRAN. To install the latest released version, run the following command in R:
Development version
To install the latest development version, run the following:
Usage
Validate character data and convert to UTF-8
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:
Normalize data
Use utf8_normalize()
to convert to Unicode composed normal form (NFC). Optionally apply compatibility maps for NFKC normal form or case-fold.