echo "$TERM" | grep -q '^linux\(-\|$\)' || return 0

# Remove UTF-8, except for `LC_CTYPE`.
eval "$(
  locale \
  | grep -v '^LC_CTYPE=' \
  | sed 's/\.\?[Uu][Tt][Ff]-\?8//g'
)"