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
1
vote
2 answers

How to convert an hex value to the acronym of the ASCII control character?

I want to convert the hex value of an ASCII control character to its acronym. For example: 1C (the code for the File Separator character) becomes FS. How can I do this in C++?
Ershad
  • 947
  • 2
  • 20
  • 40
1
vote
2 answers

Missing flow control data (0x13) from reading device data stream

I have written a Linux app to read & write binary data to a remote device over a USB port that is emulating a serial port. When I read data from the device, I have a USB sniffer that shows a binary data stream like this (0x01, 0x0A......0x13), but…
1
vote
1 answer

Is the behaviour of the tab character in a Delphi TLabel caption defined?

If I put tab characters into a string and then assign the Caption property of a label from the string what do the tab characters do? CR characters cause a return, which is useful for displaying a multi-line caption. Tab characters do seem to…
rossmcm
  • 5,493
  • 10
  • 55
  • 118
1
vote
1 answer

How to handle incoming control characters in a custom terminal?

For my project I needed to create a custom terminal-like window and connect to a Cisco router through console port. So I inherited a TextBox and created a custom control in WPF. And I thought it would be enough; just to add some code to implement…
Falander
  • 53
  • 6
1
vote
1 answer

replace ^M(control M character) in a text file in python

The file is like this: This line has control character ^M this is bad I will try it I want to remove control M characters in the file, and create a new file like this using Python This line has control character this is bad I will try it I tried…
Arthur
  • 171
  • 1
  • 10
1
vote
2 answers

How does bash handle control characters?

I'm writing a shell that tries to simulate bash's behaviour. The problem is that I've read that when Bash gets the user input, it uses a non-canonical mode and turn off the ECHO kind of like this : (*conf)->newterm.c_lflag &= ~(ICANON | ECHO); But…
Liwinux
  • 87
  • 6
1
vote
1 answer

How to add / remove 1 Byte of control character(s) STX & EXT in swift

I am writing a code, where I want to add 1 byte of STX at the start of the string & 1 byte of ETX at the end of the swift string. Not sure how to do it. Example: <1B>---<3B>--<1B>-<1B>---<3B>--<1B> Where 1B = 1…
spt025
  • 2,134
  • 2
  • 20
  • 26
1
vote
0 answers

Passing control characters to remote bash shell (alternative to ssh)

I'd like to run a remote bash shell that is fully interactive. The client side should be able to send commands to this bash process and get the outputs interactively. This means that, just like in a local bash prompt, the correlation between…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1
vote
2 answers

Backspace character does not work in the Go playground

I am new to Go. Just learnt the various uses of fmt.Println(). I tried the following stuff in the official playground but got a pretty unexpected output. Please explain where I have gone wrong in my understanding. input: fmt.Println("hi\b",…
justanotherguy
  • 399
  • 5
  • 16
1
vote
1 answer

asio_read_some countinue reading to get all data

I use boost asio async_read_some, the data I want to read STXdataETXlrc, if it were not for lrc I would use async_read_until, how can I continue reading until I get ETXlrc? appreciate all the help. /huvcbo
1
vote
2 answers

Do you know of documented uses of the APC (U+009F) control sequences?

I'm looking for documented examples of applications using the APC (APPLICATION PROGRAM COMMAND) control character. I've read ECMA-48, which defines it as follows: APPLICATION PROGRAM COMMAND APC - APPLICATION PROGRAM COMMAND Notation:…
Burt_Harris
  • 6,415
  • 2
  • 29
  • 64
1
vote
0 answers

Why does ^D (to exit a user) make Bash think I'm breaking out of a loop?

I log into an Ubuntu server as one user, and then su to an app-specific user to manage a Rails app. When I'm done and want to log out, it is normally convenient to enter controlD, but on this particular machine, I get a very odd error…
iconoclast
  • 21,213
  • 15
  • 102
  • 138
1
vote
1 answer

Replace mixed escape sequences, control characters and literals with Sed?

I have a weird mix of literal, visible and escaped control characters in a data dump that I need to clean (preferably with sed), for example ^A, ^B, \N (literally), and visible newlines. I need to clean the file such that the visible newlines remain…
Paul Smith
  • 3,104
  • 1
  • 32
  • 45
1
vote
1 answer

Python raising exception where message has carriage return \r control character

I am performing serial communications with an electronic device, and the end of a response message is dictated by a carriage return (\r). If the response is garbled, I raise a custom exception. I would like my exception message to show the raw…
Intrastellar Explorer
  • 3,005
  • 9
  • 52
  • 119
1
vote
5 answers

Swift Remove control characters from string

I have a Swift app that is scanning a barcode. The barcode sometimes contains a control character at the beginning which is not visible: \u{1D} I use this method to strip the value from the string but I am looking for something more robust in case…
Max B
  • 193
  • 1
  • 15