Skip to main content

unicode_env_enabled

Function unicode_env_enabled 

Source
pub fn unicode_env_enabled() -> bool
Expand description

Whether the process locale advertises a UTF-8 encoding.

Consults UTF8_LOCALE_ENVS in order and reports true when any is set to a value naming UTF-8 (case-insensitive, utf-8 or utf8). When none is set the result is false, so the ASCII fallback is the safe default.