ANSI问题:"\ x1B [?25h"和"\ x1BE" [英] ANSI questions: "\x1B[?25h" and "\x1BE"

查看:63
本文介绍了ANSI问题:"\ x1B [?25h"和"\ x1BE"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. "\ x1B [?25h" 会做什么?

"\ x1BE" "\ n" 有何不同?根据 http://ascii-table.com/ansi-escape-sequences-vt-100.php 它是否移至下一行"?好像就是"\ n" 做什么?

How is "\x1BE" different from "\n"? According to http://ascii-table.com/ansi-escape-sequences-vt-100.php it "moves to next line"? Seems like that's what "\n" does?

我在PHP中尝试了 echo"xxx \ nxxx \ n" echo"xxx \ x1BExxx \ n" ,它们都输出相同的内容.

I tried echo "xxx\nxxx\n" and echo "xxx\x1BExxx\n" in PHP and they both output the same thing.

有什么想法吗?

谢谢!

推荐答案

这些是ANSI转义序列(也称为VT100代码),是早于ASCII的控制代码的早期标准化.

These are ANSI escape sequences (also known as VT100 codes) are an early standardisation of control codes pre-dating ASCII.

转义序列 \ x1BE Esc + E ,是NEL或下一行",用于较旧的终端和表示CR + LF的大型机,或 \ r \ n .

The escape sequence \x1BE, or Esc+E, is NEL or "Next line", and is used on older terminals and mainframes to denote CR+LF, or \r\n.

转义序列 \ x1B [( Esc + [)"是控制序列介绍程序的一个示例.( \ x9B 是另一个单字符CSI.)紧随其后的控制序列?25h 用于显示光标.

The escape sequence \x1B[ (Esc+[) is an example of a Control Sequence Introducer. (\x9B is another single-character CSI.) The control sequence ?25h following it is used to show the cursor.

大多数终端将支持这些控制代码;要输入转义序列,您可以输入 Ctrl + V Ctrl + [],这些字符应显示为 ^[(ESC的C0代码),然后是转义代码.

Most terminals will support these control codes; to enter escape sequences you can type Ctrl+V, Ctrl+[ which should render as ^[ (the C0 code for ESC), followed by the escape code.

参考文献:

这篇关于ANSI问题:"\ x1B [?25h"和"\ x1BE"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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