Network Working Group F. Lee Request for Comments: 1843 Stanford University Category: Informational August 1995HZ - A Data Format for Exchanging Files of Arbitrarily Mixed Chinese and ASCII characters
1. Introduction
Most existing computer systems which can handle a text file of arbitrarily mixed Chinese and ASCII characters use 8-bit codes. To exchange such text files through electronic mail on ASCII computer systems, it is necessary to encode them in a 7-bit format. A generic binary to ASCII encoder is not sufficient, because there is currently no universal standard for such 8-bit codes. For example, CCDOS and Macintosh's Chinese OS use different internal codes. Fortunately, there is a PRC national standard, GuoBiao (GB), for the encoding of Chinese characters, and Chinese characters encoded in the above systems can be easily converted to GB by a simple formula. (* The ROC standard BIG-5 is outside the scope of this article.)
Lee Informational [Page 1]
RFC 1843 HZ - A Data Format for Exchanging Files August 1995 2. SpecificationThe format of HZ is described in the following.
Lee Informational [Page 2]
RFC 1843 HZ - A Data Format for Exchanging Files August 1995 3. Remarks & RecommendationsWe choose to encode any ASCII character except '~' as it is, rather than as a two byte code, and we choose ASCII as the default mode for the following reasons. The computer systems we use is ASCII based. A HZ file containing pure ASCII characters (i.e. no Chinese characters) except '~' is precisely a pure ASCII file. In general, the English (ASCII) portion of a HZ file is directly readable.
Lee Informational [Page 3]
RFC 1843 HZ - A Data Format for Exchanging Files August 1995 4. ExamplesTo illustrate the "stylistic" issue of HZ encoding, we give the following four examples of encoded text, which should produce the same decoded output. (The recommendation in the last section refers to Example 2.)
Lee Informational [Page 4]
RFC 1843 HZ - A Data Format for Exchanging Files August 1995
Author's Address