emacs-devel
[Top][All Lists]
Advanced

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

Re: Entering emojis


From: Eli Zaretskii
Subject: Re: Entering emojis
Date: Sat, 30 Oct 2021 09:22:29 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  Stefan Kangas <stefankangas@gmail.com>,
>   emacs-devel@gnu.org
> Date: Sat, 30 Oct 2021 00:16:39 +0200
> 
> (string-limit "Hello, πŸ‘¨πŸ½β€β€οΈβ€πŸ’‹β€πŸ‘¨πŸΎ" 8)
> => "Hello, πŸ‘¨"

string-limit cannot be used with strings that have wide characters and
characters that are composed on display, if the result is supposed to
be correct on display.  string-limit assumes each character occupies 1
column on display, which is not true in those two cases.  It's the
same problem as with using 'length' when you want to know how many
columns will a string occupy on display.



reply via email to

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