问题描述
我是用户,最近,当我尝试查找内容时 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。请参见:
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)是做什么的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!