String to hexadecimal:
1) For English characters, use the ASCII encoding of the character, convert to hexadecimal for output
2) For the basic special characters, the ASCII encoding of the character is also adopted and converted to hexadecimal for output
3) For complex characters such as Chinese, Japanese, Korean, etc., use the character utf8 encoding, convert to hexadecimal for output
4) compatible with js, php, java encoding formats,can be used for encoding output verification .
5) UTF8 encoding format, using 1-4 bytes as characters for encoding, most of the Chinese characters are encoded with 3 bytes, and a few uncommon Chinese characters are encoded with 4 bytes. Encode in multiple languages such as Japanese and Korean. UTF8 uses a variable-length encoding method. Compared with the Unicode encoding method, UTF8 can reduce the space occupied by storage resources and is widely used.