stri_enc_toutf32: Convert Strings To UTF-32

Description Usage Arguments Details Value Author(s) See Also

View source: R/encoding_conversion.R


UTF-32 is a 32-bit encoding where each Unicode code point corresponds to exactly one integer value. This function converts a character vector to a list of integer vectors so that, e.g., individual code points may be easily accessed, changed, etc.





a character vector (or an object coercible to) to be converted


See stri_enc_fromutf32 for a dual operation.

This function is roughly equivalent to a vectorized call to utf8ToInt(enc2utf8(str)). If you want a list of raw vectors on output, use stri_encode.

Unlike utf8ToInt, if ill-formed UTF-8 byte sequences are detected, a corresponding element is set to NULL and a warning is generated. To deal with such issues, use, e.g., stri_enc_toutf8.


Returns a list of integer vectors. Missing values are converted to NULLs.


Marek Gagolewski and other contributors

See Also

The official online manual of stringi at

Other encoding_conversion: about_encoding, stri_enc_fromutf32(), stri_enc_toascii(), stri_enc_tonative(), stri_enc_toutf8(), stri_encode()

stringi documentation built on May 17, 2021, 9:07 a.m.