Summary of garbled characters in linux: Garbled characters are common errors in language and encoding settings in linux, which are divided into the following situations. 1. Create the. bash_profile file under the root directory of the user with Terminal garbled characters. Add the following content to the end of the file and re-open terminal to export LC_ALL = zh_CN.GBK;
Export LANG = zh_CN.GBK Note: command line output garbled characters are generally caused by unreasonable system variable settings. For example, the output of less and more commands contains garbled characters www.2cto.com 2. vim garbled characters are created under the root directory of the user. in the vimrc file, add the following content to specify the encoding and disable vim to re-open it. Set fileencodings = UTF-8, gb2312, gbk, gb18030set termencoding = UTF-8
Sets fileformats = unixset encoding = UTF-8