UTF-8 Unicode operators vs digraphs

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Aug 14 00:59:20 UTC 2026


On 14/08/2026 12:17 PM, Walter Bright wrote:
>     I guess you'd have to /normalize/ them to find out.
> 
> Normalizing in Unicode means two different code points represent the 
> same code point.
> 
> Bottom line: you should be able to print a page written in Unicode, then 
> OCR it and get back the same Unicode text (at least for the non-blank 
> points). Instead, we have Unicode that means one thing to the human 
> reader and something totally different to a computer reading it.

This is not correct. To explain why:
A glyph is the image that gets rendered to screen, print wherever.

A code point is a value between 0 to 0x10FFFF, that represents a character.

Code points are divided between starters, and non-starters. This is a 
property of each code point that is provided by a table.

One or more starters and zero or more non-starters make up a glyph.
When one starter is used and zero or more non-starters its called a 
grapheme.
When more than one starter is used, its referred to as a ligature.

Unicode defines the relationship to a glyph for one starter and zero or 
more non-starters. It does not define multiple starters.

Within Unicode when a starter is equivalent to a starter with 
non-starters, the former starter is called a composed character. These 
were historical additions from earlier character sets that probably 
shouldn't have been added (but ya know 1991 was a very time hardware 
wise and not all requirements were known).

And yes they are considered equivalent.
To make processing easier you normalize them so you only have to deal 
with a single form. Usually NFC (composed) to save memory.

Non-starters are sadly required, you can't go round defining all the 
combinations between them and starters. It would be an explosion well 
beyond 0x10FFFF. Instead font rendering engines compose the glyph 
dynamically.

There is no distinction between human and computer, specifically because 
normalization, normalizes it.

It is a shame that they introduced composed characters. That was a 
mighty big mistake.



More information about the Digitalmars-d mailing list