[Top][All Lists]

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

Re: Display of undisplayable characters: \U01F3A8 instead of diamond

From: Alan Mackenzie
Subject: Re: Display of undisplayable characters: \U01F3A8 instead of diamond
Date: Sun, 4 Sep 2022 11:23:43 +0000

Hello, Eli.

On Sat, Sep 03, 2022 at 09:44:46 +0300, Eli Zaretskii wrote:
> > From: Richard Stallman <rms@gnu.org>
> > Cc: acm@muc.de, gregory@heytings.org, emacs-devel@gnu.org
> > Date: Fri, 02 Sep 2022 22:51:27 -0400

> >   > How can Emacs know which characters does your Linux console actually
> >   > support, out of all the Unicode range?

> > A few days ago you said it could use char-displayable-p
> > to determine this.  If that works, it solves the problem of finding out
> > which characters to display as diamond.

> It works, but looping over all the Unicode characters is very slow, so
> doing that at each startup would be unacceptable.  If someone needs, I
> can show a simple code to be run by the user, once, on the Linux
> console, that would allow then to determine the codepoint ranges for
> which the U+FFFD (or any other) replacements are needed, so that users
> could run that code, and then put such customizations in their init
> files.  We could even have a special command to do that, if people
> think it's important and helpful.

> But all I hear till now is flat rejection of that solution, which is a
> very weak incentive (to say the least) to work on such a command.

I will start working on this soon (if nobody else does in the meantime).

> > As for how, it would be asy to add a variable whose value should be a
> > vector containing integers, or a single-byte string, saying what to
> > send.  This will be adequate for a Linux console, and it doesn't need
> > to handle anything else.

> You are describing what display-tables provide.  That's the solution I
> recommend if you really want to see those U+FFFD "diamonds" instead of
> the characters that cannot be displayed.  I see no reason for yet
> another solution for a problem for which we already have two
> (glyphless-char-display and display-tables).

I envisage having a minor mode specific to the Linux console, which when
enabled for the first time will do the loop over all Unicode characters
testing them for glyps, and create the display table.  This can then be
stored in .emacs in the customisation section.  When the mode is
enabled, this display table will be used to output the \ufffd's.  When
disabled, the glyphless characters will get printed as hex strings, as
currently.  Possibly this will involve having two display tables which
will get swapped when the mode is en/disabled.  Or something like that.

This should work well for a user who doesn't frequently change her Linux
console font settings.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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