emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emojis and other multi-character glyphs


From: Eli Zaretskii
Subject: Re: emojis and other multi-character glyphs
Date: Sun, 26 Dec 2021 13:26:50 +0200

> From: Evgeny Zajcev <lg.zevlg@gmail.com>
> Date: Sun, 26 Dec 2021 14:09:01 +0300
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
>  > No, no, not string-width, string length in number of glyphs, as Swift 
> counts them: "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ".length
>  == 1
> 
>  Why and where is this important?
> 
> I think in any WYSIWYG env it is essential that you get length in glyphs that 
> are actually displayed instead
> number or bytes or multibyte chars used by internal representation.

But the above sequence displays here as 4 glyphs, not as one.  IOW,
a single "grapheme cluster" doesn't mean there's just one glyph there:
that "cluster" part is there for a reason.

> 30 years ago we had only single byte chars and length was a number of bytes 
> in string.  Then we had
> multibyte chars and length of such string become a number of multibyte chars. 
>  Now we have emojis
> represented by multiple multibyte chars and length should be adopted as well.

Do you really think I needed that lecture?  I didn't mention bytes of
a multibyte sequence in any of my messages, and string-width doesn't
measure the number of bytes, either.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]