Ascii
ASCII (American Standard Code for information Interchange, US Information Interchange standards codes) is a computer coding system based on the Latin alphabet, mainly used to display modern English and other Western European languages. It is now the most versatile single-byte encoding system and is equivalent to ISO/IEC 646.
Iso-8859-1
The earliest encoding is similar to ASCII encoding. is a single-byte encoding, the maximum number of characters can be expressed in the range of 0-255, applied to the English series, cannot be expressed in Chinese.
Gb2312/gbk
Specifically used to denote Chinese characters, is a double-byte encoding, while the English alphabet and iso-8859-1 are consistent (compatible with ISO-8859-1 encoding). where GBK encoding can be used to represent both traditional and simplified characters, while GB2312 can only represent simplified characters, GBK is compatible with GB2312 encoding.
Unicode
The most uniform encoding, which can be used to represent characters in all languages, is fixed-length double-byte (also four-byte) encoded, incompatible with iso-8859-1.
UTF
Because Unicode encoding is incompatible with iso-8859-1, and it is easy to take up more space, Unicode is not easy to transmit and store, so it produces UTF encoding, which is compatible with ISO-8859-1 encoding and can also be used to represent characters in all languages. UTF encoding is an indefinite length encoding, with each character varying in length from 1-6 bytes. In addition, UTF code comes with a simple checksum function. In general, the English alphabet is represented by a byte, while the kanji uses three bytes (UTF-8).
Introduction to JAVASE-21 character encoding