First, the setting modifies the system, applies the default character set
1. View the character set of the virtual machine:
This shows that the virtual machine's character set is ZH_CN. UTF-8.
2. See how the server supports encoding
3. Modifying the character set type
Visible, the lang character set type is modified to En_us.utf-8.
4. View the character type of a file
Second, The same file is stored as a different character set, and the original data is parsed
Three, Summary:
After analyzing these 4 files, we found that the 4 kinds of encoding method is only the different format of Chinese characters using different codes, and Arabic and English letters are ASCII encoding, that is why we sometimes open a file will appear garbled, and Arabic and English letters are normal reasons, Chinese characters have different Chinese character coding in different coding formats, while Arabic numerals and English letters are generally ASCII encoded.
Linux kernel Analysis--Character Set summary and analysis