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

What does "1B63" mean in bash?

When I print the string value of 0x1b63 in bash, the screen clear (exactly like tput reset result): After pressing Enter button we have: What is going on?
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
0
votes
0 answers

Python - ANSI highlight text printing out weird character instead of highlighting

I'm kind of a beginner in Python, and I wanted to highlight some text printed out such as warning, bold whatsoever, using ANSI values. I found this question (Print in terminal with colors using Python?) in Stack Overflow and I kind of used my own…
mzcoxfde
  • 235
  • 2
  • 13
0
votes
1 answer

Pyspark: Prevent removal of terminal ansi-escape characters in logging while using pyspark

I have put together a custom formatter for a logger and I am using pyspark, but it looks like all of my color is removed on the command-line. I can confirm that the escape sequences are present within the record of each emitted value, but it…
Brian Bruggeman
  • 5,008
  • 2
  • 36
  • 55
0
votes
1 answer

How to specify multiple entries in TERM environment variable?

Reading through http://invisible-island.net/ncurses/terminfo.src.html it sounds as if it should be possible to assign multiple entries (e.g. "ansi+erase" and "ansi+cup") to the TERM environment variable. Is it possible to specify multiple…
Gili
  • 86,244
  • 97
  • 390
  • 689
0
votes
1 answer

My java program doesn't display special characters on another devices

I wrote a program that reads from a file has Arabic text encoded with ANSI. I made a runnable jar of that program. It run perfectly on my Laptop, however, when I run it on another laptop the Arabic characters turn into a messy symbols. So what to…
Khazam Alhamdan
  • 98
  • 2
  • 10
0
votes
1 answer

ANSI using C and Visual Studio 2015

i have a school project where we are to code a game using c onto a Zilog Z8 encore board. This is to be written using ANSI, where the board has a console output, which is read using putty over a serial interface. However, using my windows 10…
Nothin
  • 53
  • 5
0
votes
1 answer

TelnetClient output - ANSI disable

I have seen similar question and answers on stackoverflow.com Unfortunately, this is not working for me. I have the same code as the example given in previous questions like this, but the "dumb" terminal type (TelnetClient telnet = new…
0
votes
1 answer

ANSI commands for drawing boxes in terminal

I am trying to draw a box on the screen that looks like this: ┌───┐ └───┘ I found ANSI commands to move the cursor here: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html My code looks like this: int main() { int boxsize = 5; …
lo tolmencre
  • 3,804
  • 3
  • 30
  • 60
0
votes
0 answers

What is needed to get the Windows console to recognize ANSI color sequences, using Python?

Trying to print colored text on Windows (using Python), the escape sequence prints a left arrow instead of the color. print('\033[1;34mblue\033[1;m') Result:←[1;34mblue←[1;m Is there some terminal setting I need to get this to work? Is there…
jbemt48
  • 409
  • 2
  • 7
  • 13
0
votes
1 answer

Node.js: Prevent cursor wrapping

Using process.stdout.write, the cursor is left at the end of the string you outputted. However, when you write anything against the right border of the terminal, the cursor is placed at the beginning of the next line. This causes a problem if you…
CathrineVaage
  • 33
  • 1
  • 3
0
votes
1 answer

cmd how do i use 24 colors?

When i select the dark colors they get inverted to a color that don't applies to the console. If i select dark yellow "rgb 0 128 128" it inverts to a light blue "rgb 127 127 255" color, that color is not a standard color and can't be used by…
HardCoded
  • 134
  • 2
  • 8
0
votes
3 answers

Extra Spaces Being Added After Clear Screen

I have the following code: #include #include #include #define RESET "\x1b[1J" #define D "\x1b[0m" #define Y "\x1b[33;1m" #define W "\x1b[37;1m" #define B "\x1b[30;1m" void printLeft(bool color) { if (color) { …
carloabelli
  • 4,289
  • 3
  • 43
  • 70
0
votes
1 answer

How can I set the brown color using ANSI escape sequence?

Can I use only the sequence Esc[Value,Valuem to set the brown color of background? (not only Black, Red, Green, Yellow, Blue, Magenta, Cyan, White... I want use more colors). How to implement it easily? I want to implement it in my…
Maxim Gusev
  • 213
  • 3
  • 10
0
votes
1 answer

Escaping characters in C

I want to replace all special characters in a string with their escaped equivalences (\n \t \\ \"). My idea is to use reader and writer and then put \\ before any special character. I use an dynamic array/char pointer. Since I am not so confident in…
Dimitar
  • 4,402
  • 4
  • 31
  • 47
0
votes
2 answers

Reliable overprinting of output from Python

I have some output I'd like to write over and have a simple Python function that accomplishes this fine for me (in Terminal on OS X) but am unsure if I can rely on it in general: import sys import time def print_over(s): print(s, end='\r') …
orome
  • 45,163
  • 57
  • 202
  • 418