Questions tagged [control-characters]

Control characters are non-printing characters used to send signals to the output terminal.

Control characters are generally non-printing characters that are used to send signals to the output terminal.

More information is available on Wikipedia.

218 questions
12
votes
3 answers

cscript - print output on same line on console?

If I have a cscript that outputs lines to the screen, how do I avoid the "line feed" after each print? Example: for a = 1 to 10 WScript.Print "." REM (do something) next The expected output should be: .......... Not: . . . . . . . . . . In…
Guy
  • 9,720
  • 7
  • 38
  • 42
11
votes
1 answer

Echo a Bell Character Cmd

At the command prompt in Windows, I can echo a bell character by typing echo and then holding down Ctrl+G to produce echo ^G, and it will make a bell noise when I run it. When I actually type echo ^G with my keyboard, it will only print G onto the…
Peter Ye
  • 457
  • 2
  • 6
  • 17
10
votes
2 answers

Unable to type ^A in vi

I am unable to type (Control A) characters in a shell script. By using (Ctrl+V) and then (Ctrl+A). I am unable to do so. I am able to give (Ctrl+A) from cli but not in a shell script. I am typing the shell script in vi. What I am trying to do is…
Joy Jyoti
  • 211
  • 3
  • 12
9
votes
4 answers

How to remove ETX character from the end of a string? (Regex or PHP)

How can I remove the ETX character (0x03) from the end of a string? I'd either like a function, otherwise I can write a regular expression, all I want to know is how to match the ETX character in a regular expression? trim() doesn't work.
Ali
  • 261,656
  • 265
  • 575
  • 769
9
votes
5 answers

What is the use for control characters in string.printable?

I was learning about the format mini-language and I scrolled up to view some string things, and I wondered what Python considered printable, so I checked: >>>…
Richard Haley
  • 247
  • 1
  • 2
  • 7
9
votes
1 answer

Apply control characters to a string - Python

I'm trying to apply control characters, such as '\x08 \x08' that should remove the precedent char, to a string (move backwards, write space, move backwards) For example when I type into python console : s = "test\x08 \x08" print s print repr(s) I…
Perceval W
  • 448
  • 6
  • 11
9
votes
2 answers

VIM symbol ^A in log file

When I open a special log file (http://www.quickfixj.org/) in GVIM2, I get: What does ^A especially means and how can I search it (typing /patternXY)? Thanks for your help! Kind regards P.S.: I am using VIM version 7.4 on OS Windows 7.
mrbela
  • 4,477
  • 9
  • 44
  • 79
9
votes
5 answers

Are Fortran control characters (carriage control) still implemented in compilers?

In the book Fortran 95/2003 for Scientists and Engineers, there is much talk given to the importance of recognizing that the first column in a format statement is reserved for control characters. I've also seen control characters referred to as…
EMiller
  • 2,792
  • 4
  • 34
  • 55
9
votes
3 answers

Get-Content and show control characters such as `r - visualize control characters in strings

What flag can we pass to Get-Content to display control characters such as \r\n or \n? What I am trying to do, is to determine whether the line endings of a file are in the Unix or Dos style. I have tried simply running Get-Content, which doesn't…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
9
votes
5 answers

Is 0x9B (155decimal) a special control character? Why is it missing from ascii tables?

I'm working on an embedded system, and i'm having dramas getting it to send a certain chunk of data across the serial port. I narrowed it down and found that if a 0x9B is present in the message, it corrupts the message. So i then look up 0x9b (155)…
Chris
  • 39,719
  • 45
  • 189
  • 235
8
votes
2 answers

Why is there an escape sequence for VERTICAL TAB?

Another question, What is a vertical tab?, describes what the vertical tab character was originally used for. But why was U+000B VERTICAL TAB considered important enough to be allocated an escape sequence ('\v') in the first place, in C and many…
8
votes
3 answers

Are most of the ASCII control characters obsolete?

Most of the ASCII codes under \x20 appear to be entirely obsolete. Are they used at all today? Can they be considered "up for grabs", or is it best to avoid them? I need a delimiter for grouping "lines" together and it would sure be nice to co-opt…
Chap
  • 3,649
  • 2
  • 46
  • 84
8
votes
1 answer

Hadoop - textouputformat.separator use ctrlA ( ^A )

I'm trying to use ^A as the separator between Key and Value in my reduce output files. I found that the config setting "mapred.textoutputformat.separator" is what I want and this correctly switches the separator to…
alexP_Keaton
  • 349
  • 5
  • 18
7
votes
3 answers

Using ASCII 31 field separator character as Postgresql COPY delimiter

We are exporting data from Postgres 9.3 into a text file for ingestion by Spark. We would like to use the ASCII 31 field separator character as a delimiter instead of \t so that we don't have to worry about escaping issues. We can do so in a shell…
jaegard
  • 171
  • 1
  • 7
6
votes
3 answers

Why does this C program print weird characters in output?

I've the following program: #include int main() { int ch; while( ch = getchar() != '\n') { printf("Read %c\n",ch); } return 0; } No matter what I enter I get: Read Why is this…
user437821
  • 71
  • 1
  • 6
1
2
3
14 15