Identify Unicode combining characters
How to spot Unicode combining characters, what they change in stored text, and why they matter when you reverse, style, copy or search transformed text.
Many characters that look like a single letter are stored as two or more Unicode code points. An accented letter, a stacked 'glitch' effect, a keycap emoji or a syllable in many South and Southeast Asian scripts can all be built from a base character followed by one or more combining marks. If you are judging whether a text transformation such as reversal, mirroring, styling or normalization kept the text intact, you first need to know whether combining characters are present and how they are attached.
Is inspecting for combining characters worth doing before you transform text?
Yes, whenever the text contains accents, non-Latin scripts, emoji or decorative marks and the transformation reorders, splits or substitutes characters. The main benefit is that inspection shows what is actually stored, not just what the screen draws, so you can catch broken accents and detached marks before the result is shared. The decisive tradeoff is effort: code-point inspection is precise but technical, and a visually correct result in one app does not prove the stored text is correct everywhere.
Plain, unmodified text is preferable when the content must be searchable, edited by others, read aloud by assistive technology, or matched against names, usernames, passwords or database records. In those cases, decorative combining marks and character tricks add risk without adding meaning.
What a combining character is
A combining character is a code point that is not meant to stand alone. In Unicode, it attaches to the base character that comes before it in the stored sequence and is drawn above, below, through, around or beside that base. The base and its marks together form what users perceive as one character, which Unicode calls a grapheme cluster.
Unicode assigns every code point a general category. Combining characters fall into the Mark categories:
| Category | Meaning | Example |
| Mn | Nonspacing mark: drawn without taking extra horizontal space | U+0301 COMBINING ACUTE ACCENT |
| Mc | Spacing combining mark: attaches but occupies its own width | Vowel signs in many Indic scripts |
| Me | Enclosing mark: surrounds the base | U+20DD COMBINING ENCLOSING CIRCLE, U+20E3 COMBINING ENCLOSING KEYCAP |
Marks also carry a canonical combining class, a number that describes where the mark sits, such as above or below the base. This value is used during normalization to put multiple marks on the same base into a consistent order.
Precomposed versus decomposed: same appearance, different storage
The letter é can be stored as one precomposed code point, U+00E9 LATIN SMALL LETTER E WITH ACUTE, or as two code points, U+0065 LATIN SMALL LETTER E followed by U+0301 COMBINING ACUTE ACCENT. Unicode treats these as canonically equivalent, and they usually look identical. Normalization converts between them: NFC prefers precomposed forms where they exist, while NFD splits them into base plus marks. NFKC and NFKD additionally fold compatibility variants, which can change stylized characters into plain ones.
This is why visual inspection alone cannot tell you whether a combining character is present. Two strings that look the same may contain different code points, compare as unequal in software that does not normalize, and behave differently under transformation.
What transformations do to combining characters
Character reversal is where combining marks cause the most visible damage. Take the word noël stored in decomposed form: n, o, e, U+0308 COMBINING DIAERESIS, l. Reversing the code points produces l, U+0308, e, o, n. Because a mark attaches to whatever precedes it, the diaeresis now sits on the l, giving l̈eon instead of lëon. If a mark ends up at the very start of a string, it has no base at all and many renderers show it on its own or over a placeholder dotted circle (U+25CC).
Emoji sequences break the same way. A keycap emoji is a digit, a variation selector (U+FE0F, itself categorized as a nonspacing mark) and U+20E3 COMBINING ENCLOSING KEYCAP. Family and profession emoji are joined with U+200D ZERO WIDTH JOINER, and skin-tone variants add a modifier code point. Reversing any of these by code point scatters the parts. A reversal that respects meaning has to reverse grapheme clusters, keeping each base and its marks together, not individual code points.
Other transformations change different things, and the word 'reverse', 'mirror' or 'font' is often used loosely for all of them:
- Character or word reversal changes the stored order of characters or words; combining marks must travel with their base.
- Mirrored-looking text usually substitutes different code points that resemble flipped letters; the stored characters change and the result may not read as the original word to software.
- Unicode 'font' generators substitute characters from other blocks, such as mathematical alphanumeric symbols, and some add combining marks for underline, strikethrough or stacked effects; these are stored character changes, not a font.
- CSS styling, transforms and font choices change only presentation; the stored text and its combining marks are untouched.
- Bidirectional display reorders right-to-left text visually while the stored logical order stays the same, so text can look reversed without being reversed.
Clues that combining characters are present
- The cursor or arrow keys skip over an accent as one step in some editors but stop on it separately in others.
- Backspace removes an accent but leaves the base letter, a common sign of a decomposed sequence.
- A string's reported length is larger than the number of visible characters.
- Marks appear on the wrong letter, stack vertically beyond the line, or float over a dotted circle.
- Search fails to find a word that is visibly present, because the search term and the text use different forms.
- Accent-like characters that sit beside letters rather than over them may be spacing modifier letters or standalone symbols, such as U+02C6 MODIFIER LETTER CIRCUMFLEX ACCENT or U+00B4 ACUTE ACCENT, which are not combining characters.
How to identify each code point
The reliable method is to list every code point with its official name, general category and combining class. Python's standard unicodedata module exposes all three:
import unicodedata
text = "noe\u0308l"
for ch in text:
print(f"U+{ord(ch):04X}",
unicodedata.name(ch, "<unnamed>"),
unicodedata.category(ch),
unicodedata.combining(ch))
For this input, the line for U+0308 reports COMBINING DIAERESIS with category Mn and a nonzero combining class, while the letters report class 0. Any code point whose category starts with M is a combining mark. Calling unicodedata.normalize with "NFC" or "NFD" shows whether the text changes under normalization.
In JavaScript, the regular expression /\p{M}/u matches any mark, spreading a string with [...text] iterates by code point, and Intl.Segmenter with granularity set to grapheme iterates by user-perceived character. Comparing the code-point count with the grapheme count is a quick way to see whether marks or multi-code-point emoji are present, and segmenting by grapheme is the safe basis for any reversal.
Finding a tool without writing code
Useful search terms are 'Unicode code point inspector', 'Unicode character inspector', 'show code points in string', 'grapheme cluster breaker' and 'NFC NFD normalization tool'. A suitable tool should display each code point in U+ notation with its official name and general category, and ideally show grapheme boundaries and normalization forms. Operating systems and text editors also include character viewers or code-point display options, but specific tools, menu paths and features were not verified for this article, so check that a tool actually reports categories and names before relying on it. Tool appearance and marketing language say nothing reliable about whether pasted text is stored or logged; check the tool's stated policy if the text is sensitive.
Will the result survive copying and sharing?
Combining characters are real stored characters, so copying normally carries them along. What varies is how each destination handles them. Some systems normalize text on input or storage, which can merge or split sequences; some limit or strip long runs of stacked marks; and rendering depends on whether the font supports the mark on that base. A result that looks right in one app should not be assumed to look right elsewhere. No destination-specific test results were supplied for this article, so behavior in any particular platform, browser or messaging app remains unconfirmed here.
Search and matching are a practical concern. Precomposed and decomposed forms of the same word may not match unless the search system normalizes both sides, and text built from substituted look-alike characters generally will not match the plain word at all. Editing can also surprise users when backspace deletes a mark separately from its base.
For accessibility, ordinary accents in real words are part of the language and should be kept. Decorative marks are different: stacked or excessive combining characters can obscure neighboring lines, and how a screen reader announces them depends on the specific screen reader, voice and settings. No documentation or scoped screen reader test was supplied here, so test with the assistive technology your audience uses. When styled or decorated text carries meaning, such as a name, heading or call to action, provide a plain-text equivalent nearby or use the plain text with visual styling applied through presentation instead.
Bottom line
Inspect code points before trusting any transformation of text that contains accents, non-Latin scripts or emoji. Treat a transformation as safe only if it keeps each base character together with its combining marks, preserves meaning under normalization, and still works for search, editing and assistive technology in the places it will be used. When decoration is the goal, prefer presentation-level styling; when reliability is the goal, keep the text plain and normalized.