Created attachment 138167 [details] Screenshot SUMMARY I accidentally executed `cat foo.coredump` which I generated via `coredumpctl -o foo.coredump /usr/bin/foo`. Thus I cancelled the output via `ctrl+c`. Since then, Konsole prints hieroglyphs. Please see the screenshot. SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.21.4 KDE Frameworks Version: 5.81.0 Qt Version: 5.15.2 Kernel Version: 5.12.0-1-MANJARO OS Type: 64-bit Graphics Platform: X11 ADDITIONAL INFORMATION Font: Hack 10 pt
You can observe that special characters like !"ยง$% and numbers 0123456789 are not effected.
Created attachment 138171 [details] Screenshot 2 Unfortunately I was not able to reproduce this bug again, but when I tried I made stumbled over this weird issue seen in screenshot 2: Part of the output appears in front of the PS1 command line string (red rectangle) and another part behind and is indeed treated as an input, i.e. pressing enter would try to execute it. :)
Created attachment 138172 [details] Screenshot 3 Sorry, in the case above the interpretation of the text behind the PS1 string as a command did not happen -- but it happened in the case I just attach here as screenshot 3, with which I am going to complete my testings.
Maybe this has something to do with "reflow lines on resize" option checked (though the window was always maximized) and "infinite scroll back" option checked? At least when disabling "reflow lines on resize" I could not reproduce any of the problems mentioned above, though they occurred rather rarely even when the "reflow lines on resize" was active.
I think that's the expected behaviour; you may need to reset the terminal, by issuing the `reset` command, or maybe `clear` could be enough. (There is also the Clear Terminal and Reset menu option).
I think I should close this bug report and split it into two distinct ones. For about the issue in screenshot 2, I can easily and always reproduce it via `cat /usr/bin/konsole` :)
> I think that's the expected behaviour; you may need to reset the terminal, by issuing the `reset` command, or maybe `clear` could be enough. (There is also the Clear Terminal and Reset menu option). Sorry, I hadn't seen your comment. To which issue do you refer and why is it expected? To me it sounds/looks very wrong. Also I forgot to mention that it's independent of the line reflow.
IIUC, cat'ing such types of files leaves the shell in a wrong state, which is why you need to reset or clear; (something similar, but on a different scale happens, if you cat a file that doesn't have a blank line at the end, the shell prompt will be displayed right next to the last text in that file, not on a new line as you'd expect).
I see and there's definitely no possible logic to detect and address this issue?
I don't think there's anything which can be done in Konsole, really. It's an issue in the shell (and the very concept of terminal escape codes) itself. Read https://unix.stackexchange.com/questions/119480/why-and-how-did-using-cat-on-binary-files-mess-up-the-terminal.
Thank you Ahmad and Bharadwaj for the information. Too bad! :)