GNU bug report logs -
#50865
28.0.50; Emoji with emoji modifier in Linux console garbles emacs display
Previous Next
Full log
Message #71 received at 50865 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 04 Oct 2021 16:15:45 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 50865 <at> debbugs.gnu.org
>
> > From: Aura Kelloniemi <kaura.dev <at> sange.fi>
> > Cc: 50865 <at> debbugs.gnu.org
> > Date: Mon, 04 Oct 2021 15:25:23 +0300
> >
> > The solution of modifying char-width-table at least worked very well for me.
> > Of course I am intetrested in the things that will break, if I use it, but
> > most likely those will be smaller annoyances than a garbled display.
> >
> > I can document this hack on emacs wiki, if nothing else can be done.
>
> I don't recommend documenting such a "solution", because
> char-width-table affects more than just the display of wide
> characters, it also affects Lisp programs that use string-width and
> similar functions.
Here's a potentially better solution, which uses the display-table
feature built into Emacs to display problematic characters as some
other characters:
(or standard-display-table
(setq standard-display-table (make-display-table)))
(aset standard-display-table
#x1f64f (vector (make-glyph-code #xFFFD 'escape-glyph)))
This sets Emacs to display the U+01F64F PERSON WITH FOLDED HANDS
character as a diamond with a special face. If the diamond also
causes trouble, try replacing it with some ASCII character, like '?'.
If this gives good results, you can do the same for any other
problematic character. The disadvantage is that they all will look
the same on display, and the only way of knowing what is the real
codepoint in the buffer is to go to the character and type "C-u C-x =".
This bug report was last modified 2 years and 348 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.