Estimate the share of ASCII and printable characters in text to judge encoding and content readability.
控制字符(如换行)可视情况计入安全范围。
| Item | Formula / Rule | Source / Standard |
|---|---|---|
| Printable ratio | Ratio = bytes in 0x20–0x7E ÷ total bytes × 100% | ANSI X3.4-1986 printable character set |
| Control bytes | 0x00–0x1F and 0x7F are control codes and do not count as readable | ISO/IEC 646 control character table |
| Multibyte text | Under UTF-8 a CJK character takes 3 bytes against 1 for ASCII, so heavy CJK text scores low | RFC 3629 UTF-8, a transformation format of ISO 10646 |