When using the terminal on Matlantis, multi-byte characters (such as Japanese, Korean, or emoji) may appear garbled. The following sections describe how to resolve this for common commands.
Fixing Garbled Output in less
less relies on LC_CTYPE to determine whether a character is printable. In a C.UTF-8 environment, non-ASCII characters are treated as binary data and displayed incorrectly. Since less provides its own setting (LESSCHARSET) that bypasses the locale, you can resolve this by adding the following line to ~/.bashrc:
export LESSCHARSET=utf-8
Fixing Garbled Output in vim
vim is also affected by LC_CTYPE, but it allows you to configure its internal character encoding independently of environment variables. Add the following to ~/.vimrc:
" multi-byte settings set encoding=utf-8 set fileencodings=utf-8 set ambiwidth=double
Garbled Multi-byte Filenames in ls
There is no simple fix for character encoding issues in ls.
The root cause is that LC_CTYPE is set to C.UTF-8 in the environment. While C.UTF-8 passes UTF-8 byte sequences through, it does not recognize non-ASCII characters as "printable," so ls follows this classification and replaces multi-byte filenames with escape sequences or ? characters.
Because the appropriate locale (such as ko_KR.UTF-8) is not available in the environment and sudo cannot be used, this is hard to resolve on the ls side. We recommend either avoiding multi-byte characters in filenames, or using echo * or find as alternatives.