[m-users.] Confused by action of string.prefix_length

Volker Wysk post at volker-wysk.de
Wed Jun 8 19:13:25 AEST 2022


Am Mittwoch, dem 08.06.2022 um 18:02 +1000 schrieb Peter Wang:
> On Wed, 08 Jun 2022 09:51:14 +0200 Volker Wysk <post at volker-wysk.de> wrote:
> > Hi
> > 
> > I don't find it obvious what a "code unit" is. Possibly I would confuse it
> > with "code point". Please replace "code unit" with "byte", unless there's
> > something to be said against it.
> 
> Code unit corresponds to "byte" in the UTF-8 encoding, but it is not a
> synonym. It is standard Unicode terminology. Please take some time to
> read about Unicode encodings. Every programmer must know the basics,
> it's part of the landscape just as ASCII and 8-bit code pages was.

Of course, you're right. A "code unit" is a byte in UTF-8 only. And strings
are encoded in UTF-16 for some grades. Sorry for the noise on the list.

Cheers,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220608/325e597c/attachment.sig>


More information about the users mailing list