Parser reliability

CJK and Emoji Width in Plain-Text Tables

Prepared and reviewed by the md2text maintainer. Parser-specific claims are checked against the public compatibility lab and automated regression suite.

The text ζ–‡ζ‘£ has two JavaScript UTF-16 code units but occupies four display columns in md2text’s width model. The joined emoji πŸ‘©β€πŸ’» has five code units and occupies two columns. The decomposed accent é has two code units and occupies one. Padding every cell by string length would produce a different error for each case.

The measurements below show a mixed-script status table in all three styles and a separate character-width comparison. Both use the same width function that drives the converter’s padding and result health summary.

What is being measured

UTF-16 code units describe how JavaScript stores a string. Display columns approximate the space a string occupies in a monospaced terminal. Neither measure is a pixel measurement of your browser or email font.

The width model groups text into grapheme clusters and accounts for wide characters, emoji sequences, and combining marks. For example, the combining accent in é modifies the preceding letter; treating it as a second spacing character would add an unnecessary blank to the rest of the column.

SampleUTF-16 code unitsmd2text display columns
A11
ζ–‡ζ‘£24
πŸš€22
πŸ‘©β€πŸ’»52
é21
β”Œβ”€β”33

The last sample demonstrates that Unicode does not mean double width. The three box-drawing characters occupy three columns under the current model. This is why Unicode box and ASCII grid can use the same table geometry.

The mixed-script table

The sample combines ζ–‡ζ‘£, API, and a decomposed Café with text-and-emoji status values. Count is right-aligned so that 12, 3, and 7 remain easy to compare. Grid ASCII and Unicode box each use 28 display columns and 9 output lines. Simple text uses 22 columns and 5 lines.

Rows may contain different numbers of code units while still having equal display width. In a grid, every border and content row must occupy the same number of display columns. Our regression checks compare those widths, not just whether the output contains the expected words.

Pairing an emoji with Ready or Review also keeps the status understandable if the glyph is missing, monochrome, or unfamiliar. Replacing a glyph is a presentation choice; it should not change the underlying meaning of a support table.

Why the destination may still look different

The Unicode East Asian Width specification explains that character width properties require context and tailoring in terminal emulators. They are not a complete guarantee of glyph layout. A terminal’s Unicode support, font fallback, and handling of joined emoji can disagree with a converter’s model.

A proportional email font adds another source of variation: an ASCII i and W may occupy different pixel widths even though the width model counts each as one column. Spaces cannot compensate for arbitrary font metrics across every value.

The test results on this page therefore establish md2text’s behavior for these samples. They do not claim that every terminal or mail client renders them identically, or that every possible emoji sequence has been tested.

Diagnose the drift before changing the source

If all columns drift, first choose a monospaced destination or a code block. If only rows containing emoji drift, try an equivalent text status in a copy of the table. If that aligns, the destination’s emoji rendering is a likely factor.

If only the border looks broken, try Grid ASCII. This changes border glyphs but preserves Chinese and emoji cell content. Switching to ASCII is not a general repair for wide cell characters. If a legacy destination cannot encode them at all, prepare a separate, intentional text representation and check that the meaning survives.

When the rows align but wrap, inspect maximum width instead. Include any source-comment prefix or indentation in the final budget. The 80-column repair example shows a content edit that saves 47 columns without changing option names or defaults.

Reproduce and report a mismatch

Load the example below and switch styles. The header-inclusive health row count is 4; the output line count is larger because framed styles add borders. Compare the text in your actual destination using a monospaced setting.

If you report a mismatch, describe the output style, browser, destination, font setting, and kind of character involved. Use the contact page and a synthetic reproduction if needed. Do not send a company document or customer table. The Compatibility Lab provides smaller public samples for isolating a parser or width issue.

Measured examples

Results below use the current md2text converter. Width is measured in display columns; output lines include borders and separator lines. These are constructed documentation examples, not tests of a particular email client or terminal.

Mixed-script status table

CJK labels, an emoji sequence, a combining accent, and a right-aligned numeric column share one width model.

Markdown source

| Area | Status | Count |
|---|---|---:|
| ζ–‡ζ‘£ | βœ… Ready | 12 |
| API | πŸ‘©β€πŸ’» Review | 3 |
| Café | Pending | 7 |
Measured output by style
StyleMax columnsLines80-col fit
Grid ASCII289Fits
Unicode box289Fits
Simple text225Fits
Grid ASCII output
+------+-----------+-------+
| Area | Status    | Count |
+------+-----------+-------+
| ζ–‡ζ‘£ | βœ… Ready  |    12 |
+------+-----------+-------+
| API  | πŸ‘©β€πŸ’» Review |     3 |
+------+-----------+-------+
| Café | Pending   |     7 |
+------+-----------+-------+
Try this Grid ASCII example
Unicode box output
β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Area β”‚ Status    β”‚ Count β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ζ–‡ζ‘£ β”‚ βœ… Ready  β”‚    12 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ API  β”‚ πŸ‘©β€πŸ’» Review β”‚     3 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Café β”‚ Pending   β”‚     7 β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
Try this Unicode box example
Simple text output
Area  Status     Count
----  ---------  -----
ζ–‡ζ‘£  βœ… Ready      12
API   πŸ‘©β€πŸ’» Review      3
Café  Pending        7
Try this Simple text example
Code units versus md2text display columns
SampleUTF-16 unitsDisplay columns
A11
ζ–‡ζ‘£24
πŸš€22
πŸ‘©β€πŸ’»52
é21
β”Œβ”€β”33

Convert your own table

Paste a Markdown table into the converter and choose ASCII grid, Unicode box, or Simple text output. Conversion runs locally in your browser.

Convert a Markdown table