Questions tagged [ansi-escape]

ANSI escape code (or escape sequences) is the method of in-band signaling to control formatting, color, and other output options on video text terminals.

To encode this formatting information, it embeds certain sequences of bytes into the text, which have to be interpreted specially, not as codes of characters. Although hardware text terminals have become increasingly rare in the 21st century, the relevance of this standard persists because most terminal emulators interpret at least some of the ANSI escape sequences in the output text. One notable exception is the win32 console component of Microsoft Windows.

655 questions
0
votes
1 answer

Color in JCreator

When trying to use the ANSI escape codes, it would not work. I would assume this is because JCreator does not support these escape codes. Is there any other way to print out color when using System.out.println? The ANSI codes I am using is below…
jmm8398
  • 11
  • 2
0
votes
1 answer

using serial port and OSX screen to do terminal GUI

I'd like to upgrade the output from my embedded C projects that sends debug information over the serial port using extended characters, like frame edges and corners (like from here ). I'm on OSX and using screen. I have found a library that…
David
  • 21
  • 5
0
votes
0 answers

About Ruby's and Python's ansi escape sequences

I'm using ruby 2.2 , and Python 2.7 . My code is : print("\033[4;31;42mHelloWorld\033[0m") That code works fine in Ruby . It print a colored string to the screen. But in Python , it doesn't work . Who can tell me some reasons , and if we can fix…
0
votes
1 answer

What do ^[[m, ^[[0m escape codes represent?

Code ^[[00;00m means reset color to default, however, in some programs (like source highlighter highlight for example) code ^[[m is used as if it would also serve the same purpose. What does ANSI state about such code, and also about similar ^[[0m?
Jerry Epas
  • 245
  • 3
  • 9
0
votes
1 answer

Determine if my terminal can use an ANSI escape code in python

I'm using ANSI escape codes to add colour and other effects (like bold) to the output of my python program. Using something like: print "\033[1mThis should be in bold" Will print the "This should be in bold" in my terminal. However: print…
jksnw
  • 648
  • 1
  • 7
  • 19
0
votes
2 answers

Why does this piece of code seem to fail intermittently?

I have this piece of inelegant code that's supposed to print out something that looks like this to the console: CSI='\x1B[' reset=CSI+'m' for i in range(len(recs)): print CSI+'36;40m' + str(i+1) + '\t\t', recTitles[i], CSI+'33;40m' +…
Vinayak
  • 1,103
  • 3
  • 18
  • 40
0
votes
1 answer

Adding colour to prompt stops updating current directory

My former prompt is this: PS1='[\u@\h $(x=${PWD%/*}; echo ${x##*/}/${PWD##*/})] \! $ ' That is a monochrome prompt which will dynamically display the last 2 directories in the current working directory. I changed it to this to add…
Stephen Rasku
  • 2,554
  • 7
  • 29
  • 51
0
votes
2 answers

why escape sequence can't be represented as unicodeEscape in java?

In java, "Carriage return" is represented as '\r' & "Line Feed" is represented as '\n'. But Java does not allow, "Carriage return" as '\u000d' and "Line Feed" as '\u000a'. Why?
overexchange
  • 15,768
  • 30
  • 152
  • 347
0
votes
1 answer

How do I get ANSI bright colors to work in the windows cmd?

I am using java, the jline library and jansi. I have regular colors working just fine, either using \u001B[32m for example, or Ansi.ansi().fg(Ansi.Color.GREEN). However, I cannot seem to get the bright set of colors working. I've tried both…
MrZoraman
  • 421
  • 4
  • 13
0
votes
1 answer

unknown ansi escape codes - )0[, ?7h and ?7l

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…
neubert
  • 15,947
  • 24
  • 120
  • 212
0
votes
1 answer

rxvt ignoring DECCKM sequence

I'm writing a CLI server. In my project I do the following (simplification): curses.setupterm("rxvt") smkx = curses.tigetstr("smkx") write_to_terminal_client(smkx) The detected smkx sequence is only "\E=" which matches the "infocmp rxvt" (a poor…
Marcin
  • 897
  • 1
  • 7
  • 19
0
votes
0 answers

Java - How to use ANSI in java

I am trying to send coloured messages in the console with ANSI. I added the jasni 1.9 to my jar and I tried to use the methods of ansi but that did not work. The second thing I have tried was to go to the jansi website but the website was down.…
Daan Meijer
  • 143
  • 2
  • 12
0
votes
1 answer

how to use alternate vt100 character sets

According to http://www.in-ulm.de/~mascheck/various/alternate_charset/ Esc+)+0 will make it so that a G0 set sequence table is used or something. http://www.vt100.net/docs/vt100-ug/table3-9.html seems to provide a description of the characters that…
neubert
  • 15,947
  • 24
  • 120
  • 212
0
votes
0 answers

VT100/ANSI screen location report after printing character to right most column of last row

I won't get into the major details, but here is the issue I am connecting to an ANSI/VT100 server, and the server is sending the following: [255B[255C_[6n Now, my screen is 80x25 and based on the ansi specs this should put the cursor…
Speckpgh
  • 3,332
  • 1
  • 28
  • 46
0
votes
2 answers

Color termcaps Konsole?

I've got a problem with ANSI escape codes in my terminal on OpenSuse 13.2. My Makefile use to display pretty colors on OSX at work but at home when I use it I get the litteral termcaps such as \033[1;30m ... \033[0m I know close to nothing about…
cfz42
  • 384
  • 1
  • 14