Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
ANSI escape code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== C0 control codes == Almost all users assume some functions of some single-byte characters. Initially defined as part of ASCII, the default C0 control code set is now defined in ISO 6429 (ECMA-48), making it part of the same standard as the C1 set invoked by the ANSI escape sequences (although [[ISO 2022]] allows the ISO 6429 C0 set to be used without the ISO 6429 C1 set, and ''vice versa'', provided that 0x1B is always ESC). This is used to shorten the amount of data transmitted, or to perform some functions that are unavailable from escape sequences: {| class="wikitable" |+ Popular C0 control codes (not an exhaustive list) |- ! [[Caret notation|^]] !!C0!!Abbr!!Name!!Effect |- id=BEL | {{tt|^G}} || 0x07 || {{tt|BEL}} || Bell || Makes an audible noise. |- id=BS | {{tt|^H}} || 0x08 || {{tt|BS}} || Backspace || Moves the cursor left (but may "backwards wrap" if cursor is at start of line). |- id=HT | {{tt|^I}} || 0x09 || {{tt|HT}} || Tab || Moves the cursor right to next tab stop. |- id=LF | {{tt|^J}} || 0x0A || {{tt|LF}} || Line Feed || Moves to next line, scrolls the display up if at bottom of the screen. Usually does not move horizontally, though programs should not rely on this. |- id=FF | {{tt|^L}} || 0x0C || {{tt|FF}} || Form Feed || Move a printer to top of next page. Usually does not move horizontally, though programs should not rely on this. Effect on video terminals varies. |- id=CR | {{tt|^M}} || 0x0D || {{tt|CR}} || {{nobr|Carriage Return}} || Moves the cursor to column zero. |- id=ESC | {{tt|^[}} || 0x1B || {{tt|{{visible anchor|ESC}}}} || Escape || Starts all the escape sequences |} Escape sequences vary in length. The general format for an ANSI-compliant escape sequence is defined by [[ANSI X3.41]] (equivalent to ECMA-35 or ISO/IEC 2022).<ref name="ECMA-35"/>{{Rp|13.1}} The escape sequences consist only of bytes in the range {{tt|0x20β0x7F}} (all the non-control ASCII characters), and can be parsed without looking ahead. The behavior when a control character, a byte with the high bit set, or a byte that is not part of any valid sequence, is encountered before the end is undefined.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
ANSI escape code
(section)
Add topic