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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 03 Oct 2021 08:51:39 +0300

> From: Rudi C <[email-masked]>
> Date: Sun, 3 Oct 2021 02:20:24 +0330
> 
> I have two display bugs to report, one a regression that is not present in emacs 27. I start with this
> regression.
> 
> 1. `curl https://files.lilf.ir/tmp/weird.txt > weird.txt`
> 2. `emacs -Q -nw weird.txt`
> 3. try editing the text, deleting characters, etc. The character display will get messed up.
> 
> Here is a screenshot of emacs before editing the file:
> 
> https://files.lilf.ir/tmp/tmp.kik6vbBw8S.png
> 
> And here is a screenshot after I do `backspace a`:
> https://files.lilf.ir/tmp/tmp.Twz5ZXVbR6.png
> 
> I have tried this bug with emacs 27 (both myself and some other user on IRC), and it is not present there. 
> 
> The second bug:
> 1. `curl https://files.lilf.ir/tmp/bug.txt > bug.txt`
> 2. do `cat bug.txt` and note the output:
> https://files.lilf.ir/tmp/tmp.HKfKc9PUds.png
> 
> 3. `emacs -Q -nw bug.txt`
> As you can see, emacs is displaying the file incorrectly:
> https://files.lilf.ir/tmp/tmp.0yKbCbB80R.png
> 
> In particular, the line `#+TITLE: sharif/contact info` is not displayed at all.
> 
> I could reproduce this bug on both emacs 27 and 28.

I'm unable to reproduce any of this on my system.  Both files display
correctly, and the problems after deleting character and/or after
displaying the file in a -nw session don't happen.

This could be specific to macOS, where AFAIK the display is
implemented slightly differently from the other platforms.  Or maybe
something else is at work here.  For the -nw problems, this could
perhaps be related to the terminal emulator you are using (just a
guess, I have no real explanation how that could hide entire portions
of the file's display).

P.S. The site which you use to post the files is problematic: its
certificate is expired or invalid, and at least on one of my systems
wget said the TLS handshake failed, perhaps for the same reason.