AbsoluteTelnet/SSH has three Unicode width modes: Legacy, Notcurses and Grapheme. They decide how many columns each character takes, which characters are kept together as one unit, and where the cursor lands after writing text. Applications and the terminal have to agree on these widths, or text and borders drift out of line.
Choose the mode under Connection Properties โ VT Options โ Width. Legacy is the default. Version 14.24 adds the Notcurses mode; the mode previously called Full is now called Grapheme, and sessions saved with Full open in Grapheme.
All three modes use the Unicode 18 character tables.
Legacy (xterm)
- Matches xterm’s own width table (
xterm -mk_width), character by character. - Each character takes its own width; a zero-width combining mark goes onto the cell before it.
- Emoji sequences are not combined: each emoji in a sequence takes its own columns.
- Best for: classic terminal applications, such as vi, vim, shells and ncurses programs.
Notcurses
- Groups characters into clusters and gives each cluster the width of its first character, the layout the notcurses library expects.
- Combining characters (aฬฑ), emoji with modifiers (๐จ๐ฟ) and ZWJ sequences (๐จโ๐ฉโ๐งโ๐ฆ) form one unit, as in Grapheme mode.
- Differences from Grapheme mode:
- Variation selectors don’t change the width (โ๏ธ and โ are the same width).
- Spacing combining characters add no column (เคเคพ takes one column).
- Regional indicators and conjuncts are not combined (๐ฉ๐ช, เคเฅเคค).
- Best for: applications built on notcurses.
Grapheme (2027, wcwidth, jquast)
- Text is interpreted as grapheme clusters, not individual code points.
- Multi-codepoint sequences are treated as a single unit, including:
- Combining characters (aฬฑ)
- Emoji with modifiers (๐จ๐ฟ)
- ZWJ sequences (๐จโ๐ฉโ๐งโ๐ฆ)
- Forward joining characters (Aุุจ)
- Variation selectors, VS15 and VS16 (โ๏ธ vs โ)
- Regional indicators (๐ฉ๐ช)
- Spacing combining characters (เคเคพ)
- Flags and tags (๐ด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ)
- Complex scripts and viramas (เคเฅเคค)
- Cursor movement and selection respect cluster boundaries.
- Copy and paste preserve valid, complete Unicode text.
- Follows Jeff Quast’s wcwidth, and scores 100% in ucs-detect.
- Best for: modern applications that request it, such as Neovim, and programs using the Python wcwidth or blessed libraries.
Switching from the host
Applications switch to Grapheme mode with DEC private mode 2027:
- Enable Grapheme:
ESC [ ? 2027 h - Return to the configured mode:
ESC [ ? 2027 l - Query:
ESC [ ? 2027 $ panswers1while Grapheme is in effect, otherwise2.
Mode 2027 changes only the current connection, not the saved setting. It is cleared by a terminal reset (RIS or DECSTR), when the connection ends, and when you change the Width setting yourself.
Summary
| Mode | Widths | Best for |
|---|---|---|
| Legacy (xterm) | Per character, as xterm | Classic terminal applications |
| Notcurses | Clusters at the width of their first character | notcurses applications |
| Grapheme (2027, wcwidth, jquast) | Grapheme clusters, as wcwidth | Neovim, wcwidth and blessed applications |