跳到主要内容
uencoder

检测 the encoding of unknown text and decode it correctly

Take 字符串的 mojibake 或 raw bytes, 识别是否它 是 UTF-8, Latin-1, Base64, 或 URL-encoded, 和解码它 到 readable 文本.

  1. 1

    当文本 arrives 从 unknown 源它 可以是 double-encoded, 在遗留 charset, 或 wrapped 在 Base64. Guessing 编码通过 eye 是错误-prone — use statistical 检测第一, 然后应用 matching decoder.

  2. 2
    编码检测器 →

    Paste raw 文本或 hex. tool reports 最多可能 charset (UTF-8, ISO-8859-1, Shift-JIS, etc.) 具有 confidence 评分.

  3. 3
    字符编码参考表 →

    Look 上 detected charset 到 confirm 其字节 ranges 和常见用例之前 committing 到解码.

  4. 4
    Base64 解码器 →

    如果检测 suggests Base64 (高比率的 [A-Za-z0-9+/=], 长度多个的 4), 解码这里第一, 然后 re-运行检测开 结果.

  5. 5
    URL 解码器 →

    如果文本 contains 许多 %XX sequences, URL-解码第一, 然后 re-examine 输出为 第二编码层.

常见问题

detector says UTF-8 但文本仍然 looks 错误 — 什么下一个?
文本可以是 double-encoded (e.g. UTF-8 bytes interpreted as Latin-1 然后 re-encoded). Try 解码 as Latin-1 第一, 然后 re-编码结果 as UTF-8, 或 look 为 Base64/URL 层 underneath.
如何 reliable 是自动检测?
Statistical 检测是 ~95% accurate 为常见 charsets 开充分文本, 但短 strings 或 ambiguous 字节 patterns 能够 fool 它. 总是 sanity-检查 decoded 输出针对 expected 内容.

解决此任务的工作流

相关工具