You are casting a pointer to UInt8
into Char
, which is a 32-bit quantity.
That’s why you are seeing the 3 characters packed into that one 32-bit word (along with a trailing \0).
In master, Char
is not even simply a Unicode code point (i.e. 0-0xd7ff
, 0xe000-0x10ffff
) anymore,
it is a rather complex method of packing a 1 to 4 byte UTF-8 encoding of a Unicode code point into a 32-bit value, and also allowing storing invalid UTF-8 1 to 4 byte sequences.