Unicode in subtitles
Unicode represents subtitle characters, while code units, grapheme clusters, normalization and glyph shaping describe different text-processing boundaries.
Unicode identifies the characters used in subtitle text. It allows one resource to represent many scripts and symbols, but “character count” still needs a definition.
A byte, a code point, a UTF-16 code unit, a user-perceived character and a drawn glyph can have different counts. Those differences matter when software wraps a caption, highlights text, truncates a line or positions an OCR result.
One accented letter has two common representations
The visible letter é can be represented as:
| Representation | Code points | UTF-8 bytes |
|---|---|---|
| Composed | U+00E9 | C3 A9 |
| Decomposed | U+0065 followed by U+0301 | 65 CC 81 |
The second sequence contains an ordinary e and a combining acute accent. A capable renderer positions the mark with the base letter. It is one extended grapheme cluster under the applicable segmentation rules even though it contains two code points.
Deleting just the final code point from the decomposed sequence removes the accent. Deleting the grapheme cluster removes the perceived letter. Splitting it carelessly between display lines separates information that belongs together.

A longer sequence makes the counts visible
Consider the family emoji 👩👩👧👦, made from four person characters joined by three zero-width joiners.
| Text example | Unicode code points | UTF-16 code units | UTF-8 bytes | Extended grapheme clusters |
|---|---|---|---|---|
| Composed é | 1 | 1 | 2 | 1 |
| Decomposed e + acute | 2 | 2 | 3 | 1 |
| Family emoji sequence | 7 | 11 | 25 | 1 |
Each person code point in this sequence uses two UTF-16 code units or four UTF-8 bytes. Each joiner uses one UTF-16 unit or three UTF-8 bytes. The totals are therefore 4 × 2 + 3 = 11 and 4 × 4 + 3 × 3 = 25.
A renderer with appropriate emoji/font support can present the family as a combined symbol. Another renderer can present constituent symbols. The segmentation boundary and the exact glyph appearance are distinct responsibilities.
An index measured in UTF-16 code units is consequently not the same index as one measured in Unicode code points. Passing it into an API expecting another unit can select the wrong range or split a surrogate pair.
Use boundaries suited to the operation
Grapheme segmentation identifies useful boundaries for user-perceived text units. Word segmentation and line-breaking rules answer different questions. A line does not have to break after every grapheme, and a grapheme count does not determine its width.
For subtitle highlighting, a format can define its own character-range or timing units. The producer and consumer need to agree on those units. A karaoke instruction timing one syllable is not automatically an instruction timing one byte, one code point or one glyph.
Font shaping can create ligatures or contextual glyphs after the character sequence is known. A font's glyph IDs are meaningful in that selected font; they are not Unicode character identifiers.
These distinctions are useful when an Emby conversion preserves most wording but produces a broken accent, an incomplete symbol or a highlight on the wrong part of a line. Inspect the unit and boundary used at the transformation, rather than assuming a font change will repair every text operation.
Normalization addresses equivalent sequences
Unicode normalization can transform canonically equivalent sequences. NFC composes where applicable; NFD decomposes into canonical components. The two accented-letter forms above become the same sequence when normalized to NFC.
Normalization does not translate text, reverse writing direction, choose fonts or repair an incorrect byte decoding. Applying it to café does not discover that the author intended café.
Compatibility normalization forms, NFKC and NFKD, can additionally collapse distinctions such as some presentation or width variants. That broader transformation can change text choices a caption author intended to retain.
A subtitle parser can also have exact string-matching rules for identifiers or style names. Normalizing visible wording and arbitrarily rewriting every identifier are different operations. Preserve the format's required matching semantics.