Subject: bug#50983: 28.0.50; [REGRESSION, BUG] Display bugs with uncommon characters

From: Eli Zaretskii <[email-masked]>
Date: Sun, 03 Oct 2021 15:02:20 +0300

> Date: Sun, 3 Oct 2021 12:26:22 +0100
> From: Alan Third <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> > And what do you mean by "underscore character"? What is its Unicode
> > codepoint?
> 
> In the screenshot (and in my own iTerm2 session) there is an
> underscore character after "note-". I think it's inserted by the
> terminal as a placeholder for something it doesn't understand.

No, it's a special face we use to display some characters that may
look like ASCII, but aren't.  See nobreak-char-display.

> In GUI Emacs that position in the file has a zero width character.
> 
> If I do describe-char on the underscore it says it's a plain ascii
> "o", which is clearly incorrect. In GUI it says it's 8203 (0x200B),
> "ZERO WIDTH SPACE", and as I said it displays as a zero width space.

Can you show the output of "C-x =" on all the characters, one by one,
starting from "n" in "note" and ending with "t" in "taking" after it?
Are they all incorrect, i.e. do not correspond to the place the cursor
is on?  That is, does the corruption start around there or does it
start much earlier (and if the latter, where does it start)?

> I think I agree with your other email that it's down to the terminal
> doing something strange with characters it doesn't understand.

If this is the case, the only way to fix the display is to use
us-ascii as terminal encoding.  Or maybe set up the terminal for a
"simpler" encoding, like latin-1, and then set up Emacs to that using
set-terminal-coding-system.