Share to: share facebook share twitter share wa share telegram print page

HZ (character encoding)

HZ encoding
MIME / IANAHZ-GB-2312
Language(s)Simplified Chinese, English, Russian
Created byFung Fung Lee
StandardRFC 1843
ClassificationCJK encoding, ASCII armor, variable-width encoding, stateful encoding
Transforms / EncodesGB 2312
Preceded byzW
Succeeded byQuoted-printable, UTF-7, 8BITMIME

The HZ character encoding[1] is an encoding of GB 2312 that was formerly commonly used in email and USENET postings. It was designed in 1989 by Fung Fung Lee (Chinese: 李楓峰) of Stanford University, and subsequently codified in 1995 into RFC 1843.[2]

The HZ, short for Hanzi (simplified Chinese: 汉字; traditional Chinese: 漢字; lit. 'Chinese Characters'), encoding was invented to facilitate the use of Chinese characters through e-mail, which at that time only allowed 7-bit characters. Therefore, in lieu of standard ISO 2022 escape sequences (as in the case of ISO-2022-JP) or 8-bit characters (as in the case of EUC), the HZ code uses only printable, 7-bit characters to represent Chinese characters.

It was also popular in USENET networks, which in the late 1980s and early 1990s, generally did not allow transmission of 8-bit characters or escape characters.

History

HZ superseded the earlier "zW" encoding, which marked entire lines as being GB 2312 text by beginning them with the characters zW.[3]

Structure and use

In the HZ encoding system, the character sequences "~{" and "~}" act as escape sequences; anything between them is interpreted as Chinese encoded in GB 2312 (the most significant bits are ignored). Outside the escape sequences, characters are assumed to be ASCII.

An example will help illustrate the relationship between GB 2312, EUC-CN, and the HZ code:

Various forms of the GB 2312 code (0xD2BB) for the character "一" (one)
Form Code With escape sequences Remarks
Kuten / Qūwèi / 区位 form 5027 Zone/ward/row (ku/qū/) 50, point (ten/wèi/) 27
ISO 2022 form 5216 3B16 0E16 5216 3B16 0F16 50 + 32 = 82 = 5216
EUC-CN form D216 BB16 D216 BB16 5216 ∨ 8016 = D216
HZ form (standard) 5216 3B16 7E16 7B16 5216 3B16 7E16 7D16 Appears as ~{R;~} without HZ decoder
HZ form (alternate) D216 BB16 7E16 7B16 D216 BB16 7E16 7D16 EUC form acceptable to at least some decoders

HZ was originally designed to be used purely as a 7-bit code. However, when situations allow, the escape sequences "~{" and "~}" sometimes surround characters represented in EUC-CN; this alternative use allows Chinese to be readable either with the help of HZ decoder software, or with a system that understands EUC-CN.

Additionally, the specification defines that:

  • the sequence "~~" is to be treated as encoding a single ASCII "~" and,
  • the character "~" followed by a newline is to be discarded.

However, not all HZ decoders follow these two rules.

HZ encoders and decoders

The first HZ encoder and decoder were written in 1989 by the code's inventor for the Unix operating system.[4]

The hztty program, also for the Unix operating system, was also among the first and one of the most popular HZ decoders. It deviates from the specification in that it will display the escape sequences (i.e., "~{" and "~}"), and it does not treat "~~" and "~" followed by a newline specially. This was probably to allow software which assumes one character to occupy one screen position (on a text screen) to function correctly without modification.

Support on Microsoft Windows came later, and a number of third-party "Chinese systems" support HZ. These systems may provide an option to hide the escape sequences.

Disadvantages

Because of its escape sequences, and furthermore because its escape delimiters are printable characters in ASCII, it is fairly easy to construct attack byte sequences that round-trip from HZ to Unicode and back. Use of HZ encoding is thus treated as suspicious by malware protection suites.[5][better source needed]

References

Read other articles:

Doha الدوحة ad-DawḥaKota dan MunisipalitasDari atas: Universitas Qatar, Museum Kesenian Islam, Doha Corniche, Souq Waqif, The PearlLokasi Dohan di Qatar.Negara QatarMunisipalitasAd DawhahEstablished1850Luas • City132 km2 (51 sq mi)Populasi (2009) • City998.651 • Kepadatan7,600/km2 (20,000/sq mi) • Metropolitan1 723 064Zona waktuUTC+03 (East Africa Time) Kota Modern Doha Doha (bahasa Arab: الدوحة;, Ad-Daw…

Skala Sheldon adalah skala penilaian koin dengan nilai maksimum pada poin 70, yang digunakan dalam penilaian numismatik untuk menentukan kualitas koin. Jasa grading koin American Numismatic Association (ANA), Numismatic Guaranty Company (NGC), Professional Coin Grading Service (PCGS), secara resmi berpedoman pada Skala Sheldon dalam menentukan standar penilaiannya.[1][2][3] Skala Sheldon diciptakan pertama kali pada tahun 1949 oleh seorang numismatis dan psikolog terkemuk…

Shopping mall in Hsinchu, TaiwanBig City遠東巨城購物中心LocationNo. 229, Zhongyang Road, East District, Hsinchu, TaiwanCoordinates24°48′36″N 120°58′39″E / 24.81000°N 120.97750°E / 24.81000; 120.97750Opening dateApril 28, 2012DeveloperRTKL AssociatesManagementFar Eastern GroupTotal retail floor area340,000 m2 (3,700,000 sq ft)No. of floors12 floors above ground 5 floors below groundParking3,000 parking spacesWebsitewww.febigcity.com/bigci…

Artikel atau bagian mungkin perlu ditulis ulang agar sesuai dengan standar kualitas Wikipedia. Anda dapat membantu memperbaikinya. Halaman pembicaraan dari artikel ini mungkin berisi beberapa saran. Logo BAPERTARUM-PNS Badan Pertimbangan Tabungan Perumahan Pegawai Negeri Sipil disingkat BAPERTARUM-PNS (sering disebut TAPERUM) adalah salah satu lembaga pemerintah non kementerian khusus untuk melayani bantuan Tabungan Perumahanan bagi Pegawai Negeri Sipil.. Sejarah[1] BAPERTARUM-PNS didiri…

Pour les bombardements alliés sur Berlin en 1943-1944, voir Bataille aérienne de Berlin. Bataille de Berlin Le drapeau soviétique sur le palais du Reichstag durant la bataille. Informations générales Date 16 avril – 2 mai 1945 Lieu Berlin, Allemagne Issue Victoire soviétique. Suicide d'Adolf Hitler Capitulation inconditionnelle du Troisième Reich Belligérants  Reich allemand Union soviétique Pologne Commandants Adolf Hitler † Hellmuth Reymann Helmut Weidling Gotthard Heinr…

العلاقات الإيرانية الكويتية   إيران   الكويت السفارات السفارة الكويتية في إيران   السفير : مجدي الظفيري[1]   العنوان : طهران[2]   http://kuwait.mfa.ir/ السفارة الإيرانية في الكويت   السفير : د. علي رضا عنايتي[3]   العنوان : الدعية - ق…

Speriamo che sia femminaCatherine Deneuve, Liv Ullmann, Enio Drovandi e Athina Cenci in una scena del filmLingua originaleitaliano Paese di produzioneItalia, Francia Anno1986 Durata120 min Rapporto1,66:1 Generecommedia, drammatico RegiaMario Monicelli SoggettoTullio Pinelli SceneggiaturaMario Monicelli, Tullio Pinelli, Leonardo Benvenuti, Piero De Bernardi, Suso Cecchi d'Amico ProduttoreGiovanni Di Clemente Produttore esecutivoBruno Ridolfi Casa di produzioneClemi Cinematografica Distrib…

Final Liga Eropa UEFA 2017Stockholm 2017 final identityTurnamenLiga Eropa UEFA 2016–17 Ajax Manchester United 0 2 Tanggal24 Mei 2017 (2017-05-24)StadionFriends Arena, SolnaPemain Terbaik Ander Herrera (Manchester United)[1]WasitDamir Skomina (Slovenia)Penonton46.961[2]CuacaSebagian berawan19 °C (66 °F)Kelembapan: 44%[3]← 2016 2018 → Final Liga Eropa UEFA 2017 merupakan pertandingan final sepak bola dalam Liga Eropa UEFA 2016–17, musim ke-4…

American zoologist (1887–1959) E. Newton HarveyBornEdmund Newton Harvey(1887-11-25)November 25, 1887Germantown, PennsylvaniaDiedJuly 21, 1959(1959-07-21) (aged 71)Woods Hole, MassachusettsNationalityAmericanAlma materUniversity of PennsylvaniaColumbia UniversityKnown forBioluminescenceScientific careerFieldsZoologyThesisStudies on the Permeability of Cells (1911)Doctoral advisorThomas Hunt MorganDoctoral studentsWilliam D. McElroy Edmund Newton Harvey (November 25, 1887 –…

Teuchitlán cultureWestern Mexico and the Teuchitlán culturePeriodLate Formative to the Classic PeriodDates350 BCE to 450/500 CEMajor sitesLos Guachimontones, Tabachines, Huitzilapa The Teuchitlán culture was one of several related cultures in West Mexico during the Late Formative to Classic period (350 BCE to 450/500 CE).[1] Situated in the Tequila Valleys of Jalisco, the Teuchitlán culture shared in the tradition of burying some of their dead in shaft and chamber tombs. Archaeologic…

American Atlanticist think tank founded in 1961 This article is about the U.S. think tank. For the NATO body, see North Atlantic Council. Atlantic CouncilAtlantic Council of the United States[1]Formation1961; 63 years ago (1961)TypeInternational affairs think tankLegal status501(c)(3)PurposeAtlanticismHeadquarters1030 15th Street, NW, 12th floor, Washington, D.C.LocationWashington, D.C., U.S.ChairmanJohn F. W. RogersPresident and CEOFrederick KempeRevenue (2019) $68,020…

この記事は検証可能な参考文献や出典が全く示されていないか、不十分です。出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方)出典検索?: コルク – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL(2017年4月) コルクを打ち抜いて作った瓶の栓 コルク(木栓、蘭&…

ヨハネス12世 第130代 ローマ教皇 教皇就任 955年12月16日教皇離任 964年5月14日先代 アガペトゥス2世次代 レオ8世個人情報出生 937年スポレート公国(中部イタリア)スポレート死去 964年5月14日 教皇領、ローマ原国籍 スポレート公国親 父アルベリーコ2世(スポレート公)、母アルダその他のヨハネステンプレートを表示 ヨハネス12世(Ioannes XII、937年 - 964年5月14日)は、ロー…

أوليفر كريستنسن معلومات شخصية الميلاد 22 مارس 1999 (العمر 25 سنة) الطول 1.90 م (6 قدم 3 بوصة) مركز اللعب حارس مرمى الجنسية مملكة الدنمارك  معلومات النادي النادي الحالي هرتا برلين الرقم 1 مسيرة الشباب سنوات فريق 0000–2010 Kerteminde Boldklub 2010–2018 أودنسه المسيرة الاحترافية1 سنوات فريق …

This article is about the city. For the adjacent town, see Platteville (town), Wisconsin. City in Wisconsin, United StatesPlatteville, WisconsinCityPlatteville Main StreetLocation of Platteville in Grant County, Wisconsin.Coordinates: 42°44′13.45″N 90°28′39.01″W / 42.7370694°N 90.4775028°W / 42.7370694; -90.4775028CountryUnited StatesStateWisconsinCountyGrantGovernment • City ManagerAdam Ruechel[1]Area[2] • City6.18 …

County and preserved county in Wales For other uses, see Powys (disambiguation). County and preserved county in WalesPowysCounty and preserved countyLeft to Right:View from Montgomery CastleHay-on-Wye Clock TowerCraig Goch Dam in the Elan Valley Coat of armsSovereign state United KingdomCountry WalesPreserved countyPowysEstablished1 April 1996Admin HQCounty Hall, Llandrindod WellsLargest townNewtownGovernment • TypeUnitary authority • ControlIndependent •…

Not to be confused with Fanconi syndrome. Medical conditionFanconi anemiaFanconi anemia has an autosomal recessive pattern of inheritance.PronunciationEnglish: /fɑːnˈkoʊni/, /fæn-/ SpecialtyHematology  Fanconi anemia (FA) is a rare, autosomal recessive, genetic disease resulting in impaired response to DNA damage in the FA/BRCA pathway. Although it is a very rare disorder, study of this and other bone marrow failure syndromes has improved scientific understanding of the mechanisms…

Voce principale: Promozione 1986-1987. Promozione Veneto 1986-1987 Competizione Promozione Sport Calcio Edizione Organizzatore FIGC - LNDComitato Regionale Veneto Luogo  Italia Cronologia della competizione 1985-1986 1987-1988 Manuale Nella stagione 1986-1987 la Promozione era il sesto livello del calcio italiano (il massimo livello regionale). Qui vi sono le statistiche relative al campionato in Veneto. Il campionato è strutturato in vari gironi all'italiana su base regionale, gestiti dai…

  لمعانٍ أخرى، طالع توم كونواي (توضيح). توم كونواي   معلومات شخصية اسم الولادة (بالإنجليزية: Thomas Charles Sanders)‏  الميلاد 15 سبتمبر 1904   سانت بطرسبرغ  الوفاة 22 أبريل 1967 (62 سنة)   كولفر سيتي  سبب الوفاة تشمع الكبد  مواطنة المملكة المتحدة  إخوة وأخوات جورج ساندرز…

A former Red Barn location in Mississauga, Ontario, now a Mr. Sub restaurant This is a list of defunct fast-food chains. A restaurant chain is a set of related restaurants with the same name in many different locations that are either under shared corporate ownership (e.g., McDonald's in the U.S.) or franchising agreements. Typically, the restaurants within a chain are built to a standard format through architectural prototype development and offer a standard menu and/or services. Defunct fast-f…

Kembali kehalaman sebelumnya