0

So I'm seeing some ANSI escape codes I'm unfamiliar with in some output.

\\x1B)0[
\\x1B[?7h
\\x1B[?7l

http://ascii-table.com/ansi-escape-sequences.php says that \\x1B[=7h and \\x1B[=7l will set and reset (respectively) the mode to enable line wrapping but those have ='s and not ?'s so idk how applicable that is.

Any ideas?

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
neubert
  • 15,947
  • 24
  • 120
  • 212
  • Perhaps some sort of character set issue, where `?` is supposed to be `=`? – Eric J. May 13 '15 at 05:23
  • That's what I thought but the hex of the character I'm getting back is `\\x3F`, which is the hex for `?` in ASCII. – neubert May 13 '15 at 05:25
  • 1
    http://en.wikipedia.org/wiki/ANSI_escape_code Do Control-F "[?". You'll see that ``\\x1B[?5h`` and ``\\x1B[?5l`` flash the terminal screen. Perhaps replacing 5 with 7 flashes something else. The first line there seems completely invalid though, since none of the escape codes begin with ``)`` – Patrick Roberts May 13 '15 at 05:27
  • 1
    By the way, the OP's cited URL describes `ansi.sys`, which is only vaguely related to VT100. – Thomas Dickey May 13 '15 at 12:04

1 Answers1

1

The first \\x1B)0 (if not misquoted) could be one of the character-set controls:

        C = 0  -> DEC Special Character and Line Drawing Set.
....
ESC ) C   Designate G1 Character Set (ISO 2022, VT100).
          The same character sets apply as for ESC ( C.

The ? indicates a private mode setting. ISO-6429 (ECMA-48) defines four: <, >, ? and =. The corresponding mode (still quoting XTerm Control Sequences):

CSI ? Pm h
      DEC Private Mode Set (DECSET).
...
        Ps = 7  -> Wraparound Mode (DECAWM).

The application is supposed to pause briefly between changing this between reverse-video and back to the normal state.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105