Unicode test strings
Unicode text breaks software in a few ways that keep coming back: it is counted wrong, compared wrong, drawn wrong or stored wrong. These test strings hit each of them, and every one says what it usually breaks.
Which Unicode strings should I test with?
With one string for each way text goes wrong: a character that is several characters to the program, two strings that look the same and are stored differently, text that changes direction, characters nobody can see, and characters that storage built for a narrower encoding cannot hold. A field that passes all of them handles text, not only English.
Strings counted wrong
Test text that is one character to the eye and several to the program. A limit, a counter or a cut made in the wrong unit splits it into unrelated pieces.
One image to the user, three characters plus two invisible joiners to the software; truncation cuts it into unrelated pictures.
emoji-complex/emoji-family-zwj 👍🏽A base character plus a modifier: cutting between them changes the meaning of the value.
emoji-complex/emoji-skin-tone 🇵🇱A flag is two regional indicator characters; a field limited to two characters accepts it and one limited to one splits it.
emoji-complex/flag-country éThe same letter written as a base plus a combining mark compares as different from the single-character form.
unicode-text/combining-acuteStrings that look the same and compare different
Test pairs that no person can tell apart. Search, sign-in and every uniqueness check compare what is stored, not what is shown.
A Cyrillic letter identical in shape to the Latin one; two accounts that look the same to every human.
look-alike-pairs/cyrillic-small-a ŁódźThe same word with combining marks; identical on screen, different in storage and in every comparison.
look-alike-pairs/nfd-lodz fullwidthFull-width letters read as Latin to a human and as different characters to search, filters and uniqueness checks.
unicode-text/fullwidth-latin 𝐇𝐞𝐥𝐥𝐨Mathematical letter variants defeat profanity filters and search while looking like ordinary words.
unicode-text/math-boldText that changes direction
Test right-to-left characters inside left-to-right text. What the screen shows is then in a different order from what is stored.
A direction-override character makes the text render reversed: the value shown to the user is not the value stored.
unicode-text/rtl-override JanمرحباKowalskiRight-to-left text inside a left-to-right sentence reorders on screen, so the visual order is not the stored order.
unicode-text/arabic-in-latinCharacters nobody can see
Test characters that take no space on screen and still make two strings different.
A field that looks empty but is not: required-field validation passes, and the record has no usable name.
whitespace/zwsp-only KowalskiAn invisible hyphen inside a word defeats exact search and makes two identical-looking names different records.
unicode-text/soft-hyphen JanKowalskiA byte-order mark in the middle of a value survives every copy and silently breaks exact comparison.
unicode-text/bom-inside JanKowalskiA joiner with nothing to join: invisible, meaningless, and enough to make two identical names different.
emoji-complex/zwj-orphanCharacters that break storage and layout
Test characters outside the basic plane, which storage configured for a narrow encoding cannot hold, and text that is taller or wider than the line it is drawn on.
A character outside the basic plane in a name field breaks byte-length limits and databases configured for narrow encodings.
unicode-text/emoji-in-name 𠮷A rare ideograph outside the basic plane: the same storage problem without looking like an emoji.
emoji-complex/astral-cjk è́̂̃̄̅̆̇̈̉Stacked combining marks overflow the line vertically and cover the interface around the field.
unicode-text/zalgo 名前テストDouble-width characters break column alignment and confuse character counters that assume one character is one cell.
unicode-text/cjk-mixedHow do I copy them without losing a character?
Copying from a page is the weak point: an invisible character, a joiner or a direction mark is easily lost on the way, and the test then proves nothing. The palette types every string exactly as the catalogue holds it, and nkb emit prints them escaped, so you can see every character:
$ nkb emit unicode-text --format lines --escaped
How do I go through all of them quickly?
With the palette, one shortcut per string: choose the pack Unicode and text, Complex emoji or Look-alike pairs, click the field, press AltShiftN , look at the result, and press it again for the next. When a string breaks something, AltShiftB copies a report block for the ticket, with the value written in a form someone else can type back. Getting started takes about two minutes.
The strings are on the pages of Unicode and text, Complex emoji and Look-alike pairs, with what a correct application does instead.