DG EMOJIK / Canadian English

Composite emojis and ZWJ: how do multiple characters become a single shape?

A visible emoji can consist of multiple Unicode characters. The ZWJ, or zero-width joiner, stands between the elements of certain emoji sequences and enables combined rendering. If the receiving system does not support the sequence, separate shapes may appear instead.

Full machine translation of the Hungarian original.

Close-up of stacked puzzle pieces.
Illustration. · congerdesign / Pixabay

This is why a single figure can be longer for the program than a letter. This has practical significance when copying, deleting, and applying character limits. Let's look at three specific examples of which elements must be kept together.

Let's look at the technologist

The 👩‍💻 sequence consists of the woman, the connector, and the laptop character. The code point of the ZWJ is U+200D; it is not a visible writing mark on its own. The supported sequence can be drawn by the renderer as a single shape. However, inserting a ZWJ between arbitrary characters does not automatically create a new emoji that works everywhere. Source: Unicode Emoji – Emoji ZWJ Sequences

Visible example Order of code points Components of the sequence
👩‍💻 U+1F469, U+200D, U+1F4BB Woman, joiner, laptop.
👨‍🍳 U+1F468, U+200D, U+1F373 Man, joiner, cooking character.
👩🏽‍💻 U+1F469, U+1F3FD, U+200D, U+1F4BB Woman, skin tone modifier, joiner, laptop.

In the third line, the skin tone modifier follows the woman character. It performs a different task than the connector. For example, the 👋🏽 waving hand includes a skin tone, but no ZWJ: choosing a tone alone does not make a sign a ZWJ sequence. The letter pairs of country flags also consist of multiple elements but follow different linking rules.

What does "one character" mean?

When reading, you may perceive as one figure what the program stores as multiple code points. The Unicode text segmentation rules also handle such groups perceived by the user as a single unit. The technical name is grapheme cluster. Source: Unicode Text Segmentation

Therefore, when examining the length limit of an input field, ask three separate questions: how many visible units are there, how many code points do they consist of, and what units does the program count? The label "maximum ten characters" provides little information if the interface counts something different than what the reader expects.

Try it in an empty note: paste the 👩🏽‍💻 figure, then delete it. Does it disappear all at once, or does a person, a laptop, or a tone mark remain? You see the editor's behavior from this. When shortening important text, also check the remaining part.

Why might it fall apart when copying?

Two directions of checking are useful. One is display: does the same complete sequence appear as multiple images in another program? The other is data: did the elements of the sequence survive copying and saving? The two cases may look similar externally, while requiring different fixes.

First, copy the complete symbol into an empty note, then back from there. Then try a simple smiley as well. If only the complex figure changes, specify the concrete sequence and the names of both applications in the bug report. A screenshot shows the appearance, while the pasted text also allows examination of the original characters.

Keep it together when copying and shortening

Do not cut the text in the invisible middle of the figure. When editing, select the entire emoji, and also look at the shortened version. When creating a program, it is worth choosing text processing that handles user-perceived character boundaries, then testing it with specific complex symbols.

The test before publishing should be simple: include a basic smile, a skin-tone hand, and a ZWJ sequence in the test text. Check saving, reloading, and deleting. The guides on emojis appearing as squares and on SMS character limits elaborate on the two related debugging situations.

Take the essence with you

Three-question knowledge quiz

Try how you would apply what you read. Mark one answer per question; every correct answer is worth one point. The evaluation provides feedback for these three situations; we do not store or send your answers.

1. A form counts the 👩‍💻 symbol as three code points, but you see one figure. Which conclusion is justified?
2. What is the role of the ZWJ in the presented sequence?
3. The figure falls apart after copying. Which bug report is more useful?

Solutions and explanations
  1. The program counts different units than the number of visible shapes. The three code points of the woman, the ZWJ, and the laptop can together form one visible figure.
  2. An invisible connector between elements to be displayed together. The connector is part of the sequence; rendering support is also needed for the joint drawing.
  3. The copyable sequence, the appearance, and the names of the affected applications. The data and the display together help pinpoint where the emoji changed.

Count your correct answers: each is worth one point. A skipped answer is worth zero points.

  • 3 points: You treated the figure and the stored sequence separately in the three situations; try copying and deleting in a note.
  • 2 points: Review which component or debugging data was omitted.
  • 0–1 points: Start by resolving the technologist: woman, ZWJ, and laptop.

We have another good read for you

All 20 articles · Looking for an emoji