From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: A question about emojis - like \N{HEAVY BLACK HEART} Date: Sat, 04 Feb 2023 08:50:52 +0200 Message-ID: <83a61tvs8j.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18692"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 04 07:51:44 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOCOl-0004iX-MD for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 04 Feb 2023 07:51:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOCNr-0002IC-Vc; Sat, 04 Feb 2023 01:50:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOCNq-0002I3-OH for help-gnu-emacs@gnu.org; Sat, 04 Feb 2023 01:50:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOCNq-00012Z-Ff for help-gnu-emacs@gnu.org; Sat, 04 Feb 2023 01:50:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UIgH06NcW4HdM/sFmcmM54z4U1k5ad1/6gkM1akVLoU=; b=NLEcirJRCBWB9yD3USx9 d46dojwdXuY6YDtwQVKEVC4xl9l3NwvAFkPqCyE5s1BgMtVjpioLqWucbN4lTc1bGhRan287mX+u+ uf7sTAM+jl4lt7wJjZEzI3ghiOhOZSkJd497ESk3HtGmuI6LRSrP6qQx/pVHm3oMs1hARTlHiTsn1 m6olWaZ1+GegdHvG4HBhu9wHORpeI2w2L+AjHyQLxHzCi7qNc2M5vs/yWxTxtYwS/6tIARYueZw5q qTYgx9hzR0q9b+n87KRjClaK8AljSlgnsb9tZhO98lWtVAmQPYCpqHLU9MrFEt+NGbocPLIBsbqT3 iJ0gNPP07fSVZw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOCNq-0004YE-0d for help-gnu-emacs@gnu.org; Sat, 04 Feb 2023 01:50:46 -0500 In-Reply-To: (message from Eduardo Ochs on Fri, 3 Feb 2023 23:15:50 -0300) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142591 Archived-At: > From: Eduardo Ochs > Date: Fri, 3 Feb 2023 23:15:50 -0300 > > Heavy black heart: (E2)(9D)(A4) > White frowning face: (E2)(98)(B9) > > This _may be_ the reason why "\N{HEAVY BLACK HEART}" and > "\N{WHITE FROWNING FACE}" are generating uglier versions of > the emojis. What is? what do you see in the last 2 sequences which tells you that they should display differently? > What's the recommended way to fix this? Append u+FE0F to each one of those. These characters are not by default considered Emoji, because that's what Unicode says about them. If you evaluate, for example, M-: (aref char-script-table ?❤) RET you will see that it yields 'symbol', not 'emoji'. To ask Emacs to display the Emoji appearance of these two characters, you must follow them with u+FE0F. The other characters yield 'emoji' from the above expression, so they are displayed as Emoji by default. The reason for this behavior is that many symbol characters have dual purpose, both as "normal" symbol and as Emoji, and we don't want them to display as Emoji by default, which will surprise and perhaps annoy when this happens in plain text. Emacs behaves here as Unicode mandates, by displaying each symbol according to its default appearance, and by supporting the alternate appearance when the character sequence requests that.