Skip to content

Repository files navigation

纺岚电码 (Fanglan Dianma / Hanzi Telecode Lite)

A lightweight desktop tool for encoding Chinese characters into 6-digit telecodes and decoding them back, built for cultural education and historical cipher appreciation. All rules are public and transparent — no secrets, no encryption walls, just a modern reimagining of the classic Standard Telecode Book (标准电码本).

What It Does

纺岚电码 takes any Chinese character and translates it into a 6-digit code based on the public Standard Telecode Book rules:

6-digit code = Zone(1) + Standard Code(4) + Checksum(1)
  • Zone digit: divides the codebook into 10 zones (0–9)
  • Standard 4-digit code: the original telecode from the public codebook
  • Checksum: sum of all digits mod 10

Conversely, type any 6-digit code and the tool tells you the character — with triple validation (format, zone match, checksum).

Screenshots

Encode Rules Name Query Gate Full Unlock
encode rules name gate unlocked

Key Features

  • Pure offline: zero network calls, zero external dependencies at runtime
  • Single-window Electron: minimal chrome, no menu bar, clean aesthetic
  • Name query mode: look up 4-digit standard codes (e.g., for passport / visa applications)
  • Real-time morse playback: click any digit row to hear its morse rhythm
  • Built-in help: full usage guide accessible from the app
  • Lightweight: the whole app is a single HTML/CSS/JS bundle wrapped in Electron

Tech Stack

  • Electron (no Node integration in renderer, sandboxed, context-isolated)
  • Vanilla JavaScript, no frontend frameworks
  • Standard Telecode Book dataset (public domain rules)

Run from Source

npm install
npm start

Build

npm run build

Output goes to dist/ as both NSIS installer and portable .exe.

File Layout

.
├── main.js              # Electron main process (single window, no menu)
├── index.html           # App shell
├── package.json         # Electron build config
├── README.md            # This file
├── manual.html          # In-app help documentation
├── src/
│   ├── renderer.js      # UI logic, tab switching, morse playback
│   ├── telecode.js      # 6-digit encode / decode engine
│   ├── telecode-data.js # Character↔code mapping dataset
│   ├── style.css        # UI styling
│   ├── shim1.js         # Chinese-character input shim
│   ├── shim2.js         # Clipboard / export shim
│   └── shim3.js         # Keyboard shortcut shim
└── engine/
    ├── telecode.js      # Standalone engine (same logic, Node module)
    └── telecode-data.js # Same dataset

Vision — Public Rules, Private System

纺岚电码 Lite is a showpiece built entirely on public regulations — a demonstration meant to be seen, studied, and understood by anyone. It is a project for spreading public rules.

But it is only the surface. Beyond this demo, there exists in the author's mind a far more complete tool system: a private vocabulary, a private conversion syntax, and capabilities far beyond what is shown here. That system remains private by design.

This public demo may one day serve as a cushion — a soft buffer among everything, including artificial creations.

Disclaimer

This is a public-rule demonstration and educational tool. It is:

  • Not an encryption product — it provides no secrecy and no security guarantee
  • Not connected to any proprietary cipher system
  • Not a substitute for official telecode services used by embassies or consulates

Distribution of this software, whether free or paid, does not change the above nature.

The 6-digit code format used here is a teaching-oriented extension of the public-domain 4-digit Standard Telecode Book, adding a zone prefix and checksum suffix for structural demonstration purposes only.

License

ISC

Credits

纺岚电码 by Flored Wang (@FabricatedLanguage)

Releases

Packages

Contributors

Languages