将一堆二进制数据转储到终端后,为什么击键会变成疯狂的字符? [英] Why do my keystrokes turn into crazy characters after I dump a bunch of binary data into my terminal?

查看:76
本文介绍了将一堆二进制数据转储到终端后,为什么击键会变成疯狂的字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我做类似的事情:

$ cat /bin/ls

在我的终端机上,我了解了为什么我看到一堆二进制数据,它们代表ls可执行文件.但是之后,当我收到提示时,我自己的按键看起来很疯狂.我输入"a",我得到一条奇怪的对角线.我输入"b",然后得到一个学位符号.

into my terminal, I understand why I see a bunch of binary data, representing the ls executable. But afterwards, when I get my prompt back, my own keystrokes look crazy. I type "a" and I get a weird diagonal line. I type "b" and I get a degree symbol.

为什么会这样?

推荐答案

因为二进制数据中的某个地方有一些控制序列,您的终端将这些控制序列解释为请求,例如,更改用于绘制的字符集.您可以像这样将所有内容恢复正常:

Because somewhere in your binary data were some control sequences that your terminal interpreted as requests to, for example, change the character set used to draw. You can restore everything to normal like so:

reset

这篇关于将一堆二进制数据转储到终端后,为什么击键会变成疯狂的字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆