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.devel Subject: Re: Display of undisplayable characters: \U01F3A8 instead of diamond Date: Sat, 03 Sep 2022 09:36:23 +0300 Message-ID: <83o7vxnevs.fsf@gnu.org> References: <87edx28cl1.fsf@disroot.org> <83y1v7w6eu.fsf@gnu.org> <2f302d1c3966849477b3@heytings.org> <83mtbiovzr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14485"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, gregory@heytings.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 03 08:38:11 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oUMnC-0003b0-Ms for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Sep 2022 08:38:10 +0200 Original-Received: from localhost ([::1]:40498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUMnA-00019p-N1 for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Sep 2022 02:38:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUMm6-0000Sd-Mh for emacs-devel@gnu.org; Sat, 03 Sep 2022 02:37:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUMm5-0000UY-E5; Sat, 03 Sep 2022 02:37:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=JSX4rUZSNb1AamItEPwEW21U0t2qMueS8MQ0CYbWQZs=; b=QUd3TKf3PfVL gaS+j0edBIxJFYhnFEuLNSb8b8XqOOdkFE72Q0d6GmINtY95pLe8ocXDt4MQG/2zHsxjxxRrWZK+4 EccjWfJvswn+UYUNZLiq7iCcXvPM0ABLNidY0W3XLAsK1AnYW9RI1WEtoz6eoPTn2Yi0trNp+1VXD FPZTPoKfePtCrn/ZN7WdjBFLp2huSWqe0hlCNxyMF5JgUKbs+TgqwIcf3MxLN7G1UUU1AywnugzgT NjTDHWvhKb1FNoUL7bVN0h23ozCPq2QZWgfkOID2QNOWgMXyx/rEYpLGw7D84lBP7AzQvJsvx9B8+ IDd/NpJ22sa9DAQ5beHZ4Q==; Original-Received: from [87.69.77.57] (port=3062 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 1oUMlu-0003HP-16; Sat, 03 Sep 2022 02:36:50 -0400 In-Reply-To: (message from Richard Stallman on Fri, 02 Sep 2022 22:51:26 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294608 Archived-At: > From: Richard Stallman > Cc: eliz@gnu.org, gregory@heytings.org, emacs-devel@gnu.org > Date: Fri, 02 Sep 2022 22:51:26 -0400 > > Eli said it would be difficult to reliably display undisplayable > characters as diamond _on all consoles_. But I contend that it is not > hard to implement an option to do this _on Linux consoles_. > Eli, is there something difficult about that? Yes: I know of no way of identifying such a console except by its name. And hard-coding a name of a specific console into our code is inelegant at best. Worse, AFAIU, when people use fbterm, which doesn't have these problems, the name of the console reported to Emacs is sometimes also "linux", so we already see, even in this relatively short discussion, the difficulties with using the name as the unique identifier for this purpose. More generally, I have no reason to believe that the "feature" of the Linux console whereby it accepts _any_ UTF-8 encoded character and displays the U+FFFD "diamond" replacement for those it has no glyphs, is rock-solid enough. Someone said that the Linux console only knows about Unicode 5.0 and older; we are going to see Unicode 15.0 in a few days, where there are many more characters. To say nothing of the Emacs's own extensions of the Unicode code-space. These are shaky grounds to build upon, since none of the people who are talk,ing here in favor of such a "solution" are actual maintainers of the Linux console, and none of actual maintainers have spoken in this discussion. Moreover, a safer method to get the same effect exists, and was described here. It just needs some user configuration, which unfortunately only users can do, because the Linux console (AFAIU) can be configured to use different fonts, and thus the characters it is capable of displaying correctly cannot be known by Emacs in advance. > This option doesn't need to go through terminfo, if that would make > it difficult. This kind of kludgey features leads to code that is harder to maintain, so I'd like to avoid doing so if better ways exist. And they do in this case.