2016-03-29 105 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') 

進一步閱讀: