\x1b(B)是做什么的? [英] What does `\x1b(B` do?

查看:791
本文介绍了\x1b(B)是做什么的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Blessed 用户,最近,当我尝试查找内容时 term.bold()函数的输出,我得到以下输出:
\x1b [1m\x1b(B\x1b [m

I'm a Blessed user, and recently, when I tried to find out the contents of the term.bold() function, I got this output: \x1b[1m\x1b(B\x1b[m

我理解 \x1b [1m \x1b [m 可以,但是 \x1b(B 可以做什么?我尝试打印它,但似乎没有

I understand what \x1b[1m and \x1b[m do, but what does \x1b(B do? I tried printing it, but it doesn't seem to do anything at all.

预先感谢!

推荐答案

控制序列 \x1b(B 选择默认字符集ASCII。请参见 XTerm控制序列

The control sequence \x1b(B selects the default character set ASCII. See XTerm Control Sequences:


ESC ( C   Designate G0 Character Set (ISO 2022, VT100).
          Final character C for designating 94-character sets.  In this
          list, 0 , A  and B  apply to VT100 and up, the remainder to
          VT220 and up.  The VT220 character sets, together with the
          Portuguese character set are activated by the National
          Replacement Character controls.  The A  is a special case,
          since it is also activated by the VT300-control for British
          Latin-1 separately from the National Replacement Character
          controls.
    ...
            C = B  -> United States (USASCII).

仅在将终端设置为其他字符集的情况下提供,例如画线祝福可能是在 \x1b(B\ x1b [m ,例如,

That is provided just in case the terminal was set to some other character set, e.g., line-drawing. Blessed is probably retrieving this as part of \x1b(B\x1b[m, e.g., in

    normal = tigetstr('sgr0')

进一步阅读:

  • How do I get color with VT100?
  • VT100.net

这篇关于\x1b(B)是做什么的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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