On Friday, 2 December 2022 at 21:18:44 UTC, thebluepandabear wrote:
It's his explanation as to why this code doesn't compile even though Ğ is a UTF-8 code unit:

That's not a utf-8 code unit.

A utf-8 code unit is just a single byte with a particular interpretation.

If I do `char.sizeof` it's 2 bytes

Are you sure about that? `char.sizeof` is 1. A char is just a single byte.

The Ğ code point (note code units and code points are two different things, a code point is an abstract idea, like a number, and a code unit is one byte that, when combined, can create the number).

Reply via email to