Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stri_enc_fromutf32

Convert From UTF-32


Description

This function converts integer vectors, representing sequences of UTF-32 code points, to UTF-8 strings.

Usage

stri_enc_fromutf32(vec)

Arguments

vec

a list of integer vectors (or objects coercible to such vectors) or NULLs. For convenience, a single integer vector can also be given.

Details

UTF-32 is a 32-bit encoding where each Unicode code point corresponds to exactly one integer value.

This function is a vectorized version of intToUtf8. As usual in stringi, it returns character strings in UTF-8. See stri_enc_toutf32 for a dual operation.

If an ill-defined code point is given, a warning is generated and the corresponding string is set to NA. Note that 0s are not allowed in vec, as they are used internally to mark the end of a string (in the C API).

See also stri_encode for decoding arbitrary byte sequences from any given encoding.

Value

Returns a character vector (in UTF-8). NULLs in the input list are converted to NA_character_.

See Also


stringi

Character String Processing Facilities

v1.6.1
file LICENSE
Authors
Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); IBM, Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
Initial release
2021-05-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.