![]() ![]() ![]() Here, I find some in: $ LC_ALL=C grep -rFl $'\e(H' /lib On average, one in 16 million random 3 byte sequences are that one. Now, getting a \e(H sequence (0x1b 0x28 0x48 byte sequence), in a binary file by chance is plausible. Here, I find that it's the \ec sequence it sends ( rs1/ reset_1string capability as sent by tput rs1 for instance) that takes care of restoring the default charsets).Īs to why nano for instance displays them normally, you'll find that if you run nano inside a script command session and look in the typescript result afterwards, that nano does send a \e(B sequence (selects US-ASCII for G0) after having switched to the alternate screen with \e[?1049h presumably as part of some ncurses initialisation and the original charset is restored when nano leaves that alternate screen upon exit. To restore the terminal to a sane state, you can also use the ncurses reset command. \e(H selects a Swedish charset for the G0 set ( CP1106).Enables National Replacement Character sets I can reproduce it with the xterm terminal emulator (version 366), if I do: $ printf '\e[?42h\e(H' cat chars.txt printf '\e(B\e[?42l' I was logging in using Terminal.app on macOS Big Sur. $ localeĮdit: It would be more accurate to say the server’s shell is bash 4.2. The shell I'm using is Bash version 4.2, nothing unusual. My locale settings are below I'm not sure what else to look for. Rebooting and logging in as a different user did not help. I think it happened after I downloaded a binary file with curl and forgot to use the -O argument. This machine was working fine until today. These weird characters appear everywhere, even while I'm typing. But in the terminal it looks like this: $ cat chars.txtĢ1 40 23 24 25 5e 26 2a 28 29 5f 2b 7b 7d 0a For example I made a text file with the following contents: I open this in vi or nano it looks correct just as I have written above. Some letters look fine, but some symbols appear as some non-English characters. I'm running CentOS 7.9 and today my terminal is showing weird characters. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |