C0::Pretty
Unicode Control Pictures (U+2400 block) for pretty-printing. Each C0 code at position N maps to U+2400+N.
Constants
G_DLE = glyph(DLE)
G_EOT = glyph(EOT)
G_FS = glyph(FS)
G_GS = glyph(GS)
G_RS = glyph(RS)
G_SOH = glyph(SOH)
G_US = glyph(US)
Class methods
Reformat a pretty-form string with column alignment.
Modes:
Aligned— column alignment onlySpaced— column alignment + space after prefix + space around ␟
Format a compact C0DATA buffer as a human-readable Unicode string with newlines and indentation.
Format to an IO.
Convert a C0 control byte to its Unicode Control Picture character.
Parse pretty-form back to compact form.
Rules:
- Unicode Control Pictures (U+2400-U+241F) → C0 bytes
- LF/CR are ignored (formatting only)
- Whitespace (space/tab) adjacent to control codes is trimmed
- Inside STX/ETX (␂...␃), everything is preserved verbatim (no trimming). This allows STX/ETX to serve as quoting for values with significant whitespace.