Steps to set LANG = en_US.utf8 correctly
1. Check the locale settings and find that they are not set.
# locale LANG= LANGUAGE= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL=
2. Check the settings currently supported by locale and find that en_US.utf8 is not supported.
# locale -a C C.UTF-8 POSIX
3. Confirm that the system supports en_US.utf8, and delete the comment character #.
# grep -r ' en_US.UTF-8 ' / etc / locale.gen # en_US.UTF - 8 UTF- 8
4. Generate en_US.utf8 support.
# locale-gen # locale -a C C.UTF-8 POSIX en_US.utf8
5. Set the locale
# update-locale LANG=en_US.UTF-8 # cat /etc/default/locale # File generated by update-locale LANG=en_US.UTF-8