variable
LC_CTYPE
Controls character classification and multibyte interpretation when LC_ALL is not overriding it. This fixture requires C and C.utf8 locales installed locally; other platforms can use another available UTF-8 locale name. Bash string lengths may differ from byte counts. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): C=2; UTF8=1.
Formal Syntax & Structure
bash syntaxbash
LC_CTYPEReturn Value
shell variable
Expansion yields the current value; it has no independent command exit status.
Working Example
Example Snippetbash
unset LC_ALLvalue='é'LC_CTYPE=Cprintf 'C=%s\n' "${#value}"LC_CTYPE=C.utf8printf 'UTF8=%s\n' "${#value}"