I often use the Linux terminal, and when someone uploads a file with a Chinese name, it shows Chinese garbled characters. Here is the solution.
Character encoding displayed by default
# echo $LANG
en_US.UTF-8
Modify i18n file
# vi /etc/sysconfig/i18n
LANG="zh_CN.GB18030" LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN" SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16"
Re-log in to the terminal before displaying character encoding
# echo $ LANG
zh_CN.GB18030
For more articles related to solutions to Chinese garbled characters displayed in Linux, please pay attention to the PHP Chinese website!