How Convert HZ Encoding to UTF8 Works
Convert HZ Encoding to UTF8 decodes 7-bit RFC 1843 HZ-GB-2312 payloads (`~{ ... ~}`, `~~`, and `~\n` soft line continuations) back into clean Simplified Chinese UTF-8 text.
UTF-8 (RFC 3629) is the dominant variable-width character encoding of the web, representing every Unicode scalar value from U+0000 to U+10FFFF in 1 to 4 self-synchronizing bytes while remaining 100% backward-compatible with 7-bit ASCII. Every conversion and analysis in this tool executes locally inside your browser with zero server uploads, preserving full privacy and instant response times.
RFC 1843 State-Machine Decoding
Inside ~{ ... ~}: take pairs (c1, c2) -> [c1 | 0x80, c2 | 0x80] -> TextDecoder("gb18030")
Outside ~{ ... ~}: "~~" -> "~", "~\n" -> soft continuation join
Uses the browser’s native WHATWG GB table for instant 100% coverage of all 7,445 GB2312 characters.
Worked Reference Examples
| Input | Output | Technical Note |
|---|---|---|
| This is in GB: ~{Dc:CJ@=g~}! | This is in GB: 你好世界! | Mixed ASCII + Chinese |
| ~{11>):MIO:#~} ~~ China | 北京和上海 ~ China | Unescapes ~~ to ~ |
| ~{42G0CwTB9b#,RIRJ5XIOK*!#~} | 床前明月光,疑是地上霜。 | Full punctuation + Hanzi |
Practical Developer & Systems Workflows
Reading Legacy Chinese Usenet & Email Archives
Convert cryptic `~{Dc:C~}` 1990s posts immediately into modern UTF-8.
Security & Charset Triage
Inspect HZ-encoded strings cleanly without legacy OS codepages.
Compatibility, Edge Cases & Best Practices
Supports RFC 1843 `~\n` line-continuation sequences automatically.
Copy verified outputs directly to your clipboard or export clean UTF-8 files ready for source repositories, REST APIs, database migrations, protocol test suites, and systems debugging.