UTF-8 Unicode operators vs digraphs

Dlighted test at example.com
Fri Aug 14 06:17:58 UTC 2026


On Friday, 14 August 2026 at 00:17:36 UTC, Walter Bright wrote:
> On 8/13/2026 12:20 AM, Dlighted wrote:
> What Unicode has done wrong is attach semantic meaning to code 
> points. This is all wrong. When you read a printed page, the 
> semantic meaning depends on the context, not the glyph.
>
> For example, there is the letter 'a' and the mathematical 
> variable 'a'. They are different code points, but they are 
> identical. Have you ever read a math book and had trouble 
> distinguishing the two? I haven't.

Yes, I agree. However you can simply choose not to use 
mathemathical letters. There are other similar small missteps too 
like the prebaked fi ligature (fi) that you're not supposed to use 
and only exists for compatibility with some old codepage. I 
haven't seen my Tesseract OCR produce math letters though. It's 
not a major problem. We could talk about the pregnant man emoji 
(🫃, 🫃🏻, 🫃🏼, 🫃🏽, 🫃🏾, 🫃🏿), some widely used symbols missing for 
political reasons, the handgun becoming a watergun and so on but 
overall I think it's not that bad.

>> I guess you'd have to _normalize_ them to find out.
>
> Normalizing in Unicode means two different code points 
> represent the same code point.

Depends on normalization form.
Anyway, I know you mean stuff like é, è, ê having multiple 
representations but it's not much different of a problem.
Unicode allows adding all kinds of combining marks to letters 
allowing the combinations not standardized by Unicode.
 From what I've seen most modern software outputs precomposed 
forms for simple letters if available.
I guess it could have been avoided by having no precomposed forms 
but that would increase the size of common european letters and 
make them all two code points. Imagine how much software would 
give me troubles for using two code points. In the decomposed 
form, you can accidently match the uncomposed character before 
the combining mark you're combining with if you're just matching 
bytes without any awareness of graphemes.


More information about the Digitalmars-d mailing list