utf8Conversion {base} | R Documentation |
Conversion of UTF-8 encoded character vectors to and from integer vectors.
utf8ToInt(x) intToUtf8(x, multiple = FALSE)
x |
object to be converted. |
multiple |
logical: should the conversion be to a single character string or multiple individual characters? |
These will work in any locale, including on machines that do not otherwise support multi-byte character sets.
utf8ToInt
converts a length-one character string encoded in
UTF-8 to an integer vector of (numeric) UTF-8 code points.
intToUtf8
converts a vector of (numeric) UTF-8 code points
either to a single character string or a character vector of single
characters. (Note that a single character string could contain
embedded nuls.) The Encoding
is declared as
"UTF-8"
.
## Not run: ## will only display in some locales intToUtf8(0x03B2L) # Greek beta ## End(Not run)