bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50865: 28.0.50; Emoji with emoji modifier in Linux console garbles e


From: Eli Zaretskii
Subject: bug#50865: 28.0.50; Emoji with emoji modifier in Linux console garbles emacs display
Date: Mon, 04 Oct 2021 19:35:23 +0300

> Date: Mon, 04 Oct 2021 16:15:45 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 50865@debbugs.gnu.org
> 
> > From: Aura Kelloniemi <kaura.dev@sange.fi>
> > Cc: 50865@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 =".






reply via email to

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