`\x1b(B`做什么?

2024-05-19 17:38:31 发布

您现在位置:Python中文网/ 问答频道 /正文

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

我知道\x1b[1m和{}做什么,但是{}做什么呢?我试着把它打印出来,但好像什么也没用。在

提前谢谢!在


Tags: 函数用户内容termboldx1bblessed
1条回答
网友
1楼 · 发布于 2024-05-19 17:38:31

控制序列\x1b(B选择默认字符集ASCII。见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).

这是在终端被设置为其他字符集的情况下提供的,例如line-drawingBlessed可能正在检索它作为{}的一部分,例如

^{pr2}$

进一步阅读:

相关问题 更多 >