THE FOLD / CO-OP / THE MERGE / THE GRAPHEME CLUSTER
THE GRAPHEME CLUSTER
eleven, seven, one - all correct
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
How long is a family emoji? Eleven, if you ask the string. Seven, if you ask how many characters. One, if you ask a person. All three answers are correct and they are answers to different questions.
LIT verified live. the family 👨👩👧👦 measures 11 UTF-16 code units, 7 code points and 1 grapheme cluster. The flag 🇬🇧 measures 4, 2 and 1. A skin-toned thumb measures 4, 2 and 1. Reversing the family by code unit does not return the original and neither does reversing it by code point — only the cluster is the unit a reversal can safely move.
LIT verified live. the family 👨👩👧👦 measures 11 UTF-16 code units, 7 code points and 1 grapheme cluster. The flag 🇬🇧 measures 4, 2 and 1. A skin-toned thumb measures 4, 2 and 1. Reversing the family by code unit does not return the original and neither does reversing it by code point — only the cluster is the unit a reversal can safely move.
2 HOW IT WAS WEAVED · AI + HUMAN
Grapheme cluster boundaries are UAX #29;
AVAN (AI) reports all three numbers side by side because the bug is never that a program used the wrong one — it is that the program never knew there were three.
Intl.Segmenter implements them, and this sphere uses it rather than approximating.AVAN (AI) reports all three numbers side by side because the bug is never that a program used the wrong one — it is that the program never knew there were three.
length answers a storage question and gets used as a display question; truncating at 10 to fit a field splits the family in half and produces something that is not a character at all.3 ONE DIMENSION
Eleven, seven, one. Three right answers.
4 TWO DIMENSIONS · INTERACTIVE
Truncate the string and watch a person come apart.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object.
AVAN’s addition (the inverse-companion): the forward reading is that you should count grapheme clusters. The inverse is that there is no such thing as the length of a string — only the length of a string for a purpose. Storage wants code units, a database column wants bytes, a cursor wants clusters, and a line-break wants something else again. Read backwards,
length is not a property being reported but a question being answered, and the single most common bug in text handling is a program that asked one question and used the answer for another.LIT the family emoji measures 11 UTF-16 code units, 7 code points and 1 grapheme cluster; the flag measures 4, 2 and 1, and a skin-toned thumb measures 4, 2 and 1 - and reversing the family by code unit does not return the original, nor does reversing it by code point, because only the cluster is a unit a reversal can safely move
FIG Grapheme cluster boundaries are UAX #29; Intl.Segmenter implements them and this sphere uses it rather than approximating. AVAN reports all three numbers side by side because the bug is never that a program used the wrong one - it is that the program never knew there were three. length answers a storage question and gets used as a display question; truncating at 10 to fit a field splits the family in half and produces something that is not a character at all.
FIG Grapheme cluster boundaries are UAX #29; Intl.Segmenter implements them and this sphere uses it rather than approximating. AVAN reports all three numbers side by side because the bug is never that a program used the wrong one - it is that the program never knew there were three. length answers a storage question and gets used as a display question; truncating at 10 to fit a field splits the family in half and produces something that is not a character at all.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MERGE · David Lee Wise (ROOT0), with AVAN