Character Set (charset) code point
In ASCII, for example, it assigns a numeric ordinal to each character, such as A's coded point is 65, and the set of all code points is called the character set.
Character encoding (char encoding)
Character encoding is the binary storage format for code points. A character set will have multiple storage formats, such as Unicode with UTF-8, UCS-16, UCS-32
UTF-8: Network transport and local storage
UCS-16: Memory Storage
UCS-32:
Vim involves encoding the settings fileencoding
Encoded format of the file file itself stored on disk
Encoding
The encoding format of the menu, tag, buffer, etc. of vim itself at runtime
Termencoding
Encoding format for various terminal configurations, only one encoding format can be used at a time, and characters are decoded from the received binary byte stream in accordance with the format
The best configuration to solve the vim garbled
Echo ' Set Fileencoding=utf-8
Set Encoding=utif-8
Set Termencoding=utf-8,gbk,latin1 ' >> ~/.VIMRC
Resources:
51279810
Vim Display garbled solution