From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Display of undisplayable characters: \U01F3A8 instead of diamond Date: Fri, 02 Sep 2022 17:47:39 +0600 Message-ID: <87bkry9ew4.fsf@disroot.org> References: <87edx28cl1.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25007"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Richard Stallman , eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 02 14:02:51 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 1oU5Nq-0006IP-JC for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Sep 2022 14:02:50 +0200 Original-Received: from localhost ([::1]:43766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oU5Np-00013c-2E for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Sep 2022 08:02:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oU5MO-0000Eb-Uf for emacs-devel@gnu.org; Fri, 02 Sep 2022 08:01:21 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:45600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oU5MM-0006JN-NC; Fri, 02 Sep 2022 08:01:20 -0400 Original-Received: by disroot.org (Postfix, from userid 107) id 08A3F49FCE; Fri, 2 Sep 2022 13:58:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662119884; bh=mvUqhVQGDVuWTqEsonofnKLIW9Z0eDFGF3vMubsrs64=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ReNc7lyYq19zYhOvLXRI2ki/yu6CzVDkYzuwBVD1pDTSSze+blzzzxRrjw37O+0yp P7/DZgBeGqi0iMh/0VaKZh5QcB4dcAB+nB1gBTK+4rUQWagqaYA0Sbe6vqfFvo1y03 zC7bZuQUjt7WbTA+KsM+DrD3o9U56FHsHC6hBEeHsZfIvxUWGEG4hKJ9H87uc0Ct5L o0NaYw5A8PUPPBiWpbUmIveiX2OoPSXnQy0EDvs7gs/13WBlLCqtgli6HAQ/25QcRq +2WrNg8mHNoJbdq70/cqEJuW7DLZsr+gQincEQwdFdAjIT/4CvWjJc2KRHCiIC0xsN qtWVTfTnlZ2IQ== In-Reply-To: (Richard Stallman's message of "Sun, 28 Aug 2022 23:36:01 -0400") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:294537 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > Anyway, > > I workarounded it by modifying glyphless-char-display with the follow= ing > > in terminal buffers: > > > --8<---------------cut here---------------start------------->8--- > > (set-char-table-extra-slot glyphless-char-display 0 'thin-space) > > --8<---------------cut here---------------end--------------->8--- > > > This shows a single space character.=20=20 > > Could a variant of that display a diamond instead of a space? I couldn't find one. I tried the following, but it didn't work: =2D-8<---------------cut here---------------start------------->8--- (set-char-table-extra-slot glyphless-char-display 0 "=EF=BF=BD") =2D-8<---------------cut here---------------end--------------->8--- It didn't show the diamond (or, in my case, a character similar to a question mark in inverse video), which is the expected behavior according to the manual, but it didn't even show the diamond in a box (or square brackets), instead just a empty box appeared, which is unexpected. > > Eli wrote > > > One way of verifying this is to type > > > C-x 8 RET fffd RET > > > in an Emacs session which displays on the Linux console, and see if > > that shows the diamond-like glyph or the \Unnnn thing. If it's the > > latter, it means the console doesn't support that character, and we > > cannot send its code from Emacs. How do Emacs know that determine whether a character is supported or not? Using the encoding used for output? > > but what is so bad about sending a glyph that the terminal can't > display? What bad results does it cause? As long as the character can be encoded to the encoding the terminal understand, AFAIK it's fine. But if the character can't be encoding, it's impossible, because you don't know how to send it and the terminal doesn't know how to read it. > > Or how about fixing it by sending an official code for that diamond glyph? I think it's better. But the format of glyphless-char-display should be changed to allow something like the following too, which won't put the text in a box: =2D-8<---------------cut here---------------start------------->8--- (set-char-table-extra-slot glyphless-char-display 0 (verbatim . "=EF=BF=BD"= )) =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 Akib Azmain Turja Find me on Mastodon at @akib@hostux.social. This message is signed by me with my GnuPG key. Its fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmMR7VsACgkQVTX89U2I YWtrWA//feLoKlfH3w2+JhvqPmzgW5w4GlR/952HIQXKOrst0IgwwYN7Ty+kBNNU od4vZt2APW7jGDPHEhvCOtUQLV2b+ZGqcjEKtZyx2sNtcyeAq4C6kCBYsrLofn2S h2w/V+Iq9lC1nxb1gwutsOtGgUSRJ0ACT+pElSfIXawGdVBCuEHRCFvf+z831+gY GbV3LldCjkLb/sXXk9sroU7xP0DrbmWLapIxgLXH5Mxb5og2aR+GGUCNaODzn2d9 6T5OZHL/xCpR7RDk/pQcJGYKGVzUka1DWxxLmJeyL7kmBiCrmuMfBQRxMCeRzWan hT1XC/PcLfgU96W3lRJAk5zJYxSU1n3jxitv5TTY9BSyBsXzlBQ644AAEBRNctsF NqUUol8dkob7nk8cnef7rTbVhGEwzY3jNnwut0Khx0O66aAGTlQ6ZVHZv4ojwWKD rkgpFWc0qL7hkXPeUtV4/qipOr/uLb5ywV2N9BX1UNXKLQT/ucnAVCqfOzHZAqqa kbp8vRtqGetJTYcmPs1B3pdgUVoE7lhjaNJXI5BHPKHYwBLhvf1h2oBGvtNpzMVk 9kypb2NoRI4/GM9Ed4ZcaXlDIFM2HY3HMLHVyEZbMxt1I8PzjQd/fM9wSGh8hc8l l6EHOmSjo/c8Skmw9t/8lxDGmUfMLPkcn3WFtOGb09UKU5OyAIc= =VbxE -----END PGP SIGNATURE----- --=-=-=--