HZ (character encoding)

from Wikipedia, the free encyclopedia

HZ is a character encoding of the Chinese script and is described in RFC 1843 . Its character range corresponds to GB2312 , but only uses the printable 7-bit characters of the ASCII character set for encoding and is intended for mails and Usenet, where only 7-bit postings were allowed at the time of its introduction in 1989.

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

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

Since 8-bit characters are now mostly allowed in emails, HZ is no longer used.

Web links