2016-03-29 100 views
0

我是Blessed用户,最近,当我试图找出term.bold()函数的内容,我得到这样的输出:? \x1b[1m\x1b(B\x1b[m什么` X1B(B`做

我明白了什么\x1b[1m\x1b[m做的,但到底是什么\x1b(B办?我试着打印出来,但它似乎并没有做任何事情。

提前感谢!

+0

[本VT100/ANSI转义码参考](HTTP ://www.termsys.demon.co.uk/vtansi.htm)应该有所帮助。提示:“B”不是转义序列的一部分。 –

+0

@Joachim Pileborg啊我看到了......所以'\ x1b('设置默认字体。那么B代表什么? –

回答

0

控制序列\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可能是检索此作为\x1b(B\x1b[m一部分,例如,在

normal = tigetstr('sgr0') 

进一步阅读: