stri_enc_set sets the encoding used to re-encode strings
internally (i.e., by R) declared to be in native encoding,
see stringi-encoding and
stri_enc_get returns the currently used default encoding.
1 2 3
single string; character encoding name,
stri_enc_get is the same as
Note that changing the default encoding may have undesired consequences.
Unless you are an expert user and you know what you are doing,
stri_enc_set should only be used if ICU fails to detect
your system's encoding correctly (while testing stringi
we only encountered such a situation on a very old Solaris machine).
Note that ICU tries to match the encoding part of the
category as given by
If you set a default encoding that is neither a superset of ASCII, nor an 8-bit encoding, a warning will be generated, see stringi-encoding for discussion.
stri_enc_set has no effect if the system ICU assumes that
the default charset is always UTF-8 (i.e., where the internal
U_CHARSET_IS_UTF8 is defined and set to 1), see
stri_enc_set returns a string with
previously used character encoding, invisibly.
stri_enc_get returns a string with current default character
Marek Gagolewski and other contributors
The official online manual of stringi at https://stringi.gagolewski.com/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.