HZ (character encoding)

HZ is a character encoding of Chinese writing and is described in RFC 1843. It corresponds to the character in scope GB2312, but used to encode only the printable 7-bit characters of the ASCII character set and is determined by where the time of introduction in 1989, only 7-bit postings were allowed for mail and Usenet.

HZ is standard in the 7- bittigen ASCII mode in HZ coded texts that use only ASCII characters, it is a valid and readable ASCII text. The tilde ~ starts an escape sequence: ~ and then the control character for " new line " starts a new line, ~ ~, the tilde represents itself, and ~ { switches to the GB mode. The GB- mode is 16- bit mode, the first byte is a character in the range 0x21 - 0x77, the second byte can be any printable ASCII character. The escape sequence ~ } ( an invalid GB sequence) switches back to the ASCII mode.

The first HZ decoder was written by the inventor of coding in 1989 for Unix, later, other operating systems are supported.

Because now usually also 8 -bit characters are allowed in email, HZ is no longer used.