AureliaRen

Garbled Text Checker — Development skill for Claude Code

Development community

乱码检测与修复:12 种类型(六种经典中文乱码 + HTML转义/UTF-16/cp1252 等 + 隐形码不可见 Unicode),BFS 反向还原 + Claude Code skill + 自动检测 hook.

How to install Garbled Text Checker

This entry records only its repository, not the path inside it, so there is no exact command to give. Open AureliaRen/garbled-text-checker and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Garbled Text Checker does

乱码检测与修复:12 种类型(六种经典中文乱码 + HTML转义/UTF-16/cp1252 等 + 隐形码不可见 Unicode),BFS 反向还原 + Claude Code skill + 自动检测 hook.

Alternatives in Development

  • Speech — Generate spoken audio from text using OpenAI's API with built-in voices 14.6k ★
  • Sanitize — Detect and redact PII from text files — 15 categories (SSNs, credit cards, API keys, etc.), zero dependencies 3.1k ★
  • Kimi CLI Agent — Answers one council question as plain text, with no tool access 664 ★

README

Garbled Text Checker 乱码检测与修复

Detect and fix garbled text (mojibake) — 13 garbled-text types, BFS reverse-decoding repair, LaTeX formula flattening, and a Claude Code skill + auto-detection hook.

[![CI](https://github.com/AureliaRen/garbled-text-checker/actions/workflows/ci.yml/badge.svg)](https://github.com/AureliaRen/garbled-text-checker/actions/workflows/ci.yml)

Identify and repair garbled text caused by encoding errors: the 6 classic Chinese mojibake types (**古文码 / 口字码 / 符号码 / 拼音码 / 问句码 / 锟拷码**) plus 7 extended types (HTML double-escape / lone surrogates / cp1252 misread / UTF-16 misread / C1 control characters / invisible Unicode / raw LaTeX formula residue). Ships as a standalone CLI, a portable script, a LaTeX formula flattener, and a Claude Code skill with an automatic PostToolUse hook.

Features 功能

  • **13 种乱码类型检测**(含隐形码与公式码)(13 type detection incl. invisible Unicode & LaTeX residue)

    Classic 经典 Cause 成因
    古文码 Guwen GBK misread as UTF-8
    口字码 Kou UTF-8 misread as GBK (U+FFFD)
    符号码 Fuhao ISO-8859-1 misread as UTF-8
    拼音码 Pinyin ISO-8859-1 misread as GBK
    问句码 Wenju Truncated GBK→UTF-8 chain
    锟拷码 Kunkao U+FFFD stream re-read as GBK
    Extended 扩展 说明
    HTML double-escape & repeated entity escaping
    Lone surrogates Invalid U+D800-DFFF units
    cp1252 misread Windows-1252 decoding of UTF-8 bytes
    UTF-16 misread UTF-16LE/BE bytes read as latin-1
    C1 control chars U+0080-U+009F byte-stuffing residue
    Raw LaTeX residue 公式码 Unrendered $$…$$ / \frac{}{} / 10^{23} markers leaked into terminal output
  • **BFS 多轮反向还原** (BFS reverse-decoding repair): tries `4 encodings × 7 decodings` up to 4 rounds, scores candidates by GBK level-1 Han character ratio, returns the best clean result. Honest about unrecoverable input (U+FFFD means bytes are gone — it says so instead of fabricating).

  • **完整 CLI**: multiple files, recursive directory sca