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!
== Fe Escape sequences == If the [[#ESC|{{code|ESC}}]] is followed by a byte in the range 0x40 to 0x5F, the escape sequence is of type {{code|Fe}}. Its interpretation is delegated to the applicable [[C0 and C1 control codes|C1 control code]] standard.<ref name="ECMA-35"/>{{Rp|13.2.1}} Accordingly, all escape sequences corresponding to C1 control codes from ANSI X3.64 / ECMA-48 follow this format.<ref name="ECMA-48"/>{{Rp|5.3.a}} The standard says that, in 8-bit environments, the control functions corresponding to type {{code|Fe}} escape sequences (those from the set of [[C1 control codes]]) can be represented as single bytes in the 0x80β0x9F range.<ref name="ECMA-48"/>{{Rp|5.3.b}} This is possible in character encodings conforming to the provisions for an 8-bit code made in ISO 2022, such as the [[ISO 8859]] series. However, in character encodings used on modern devices such as [[UTF-8]] or [[CP-1252]], those codes are often used for other purposes, so only the 2-byte sequence is typically used. In the case of UTF-8, representing a C1 control code via the [[C1 Controls and Latin-1 Supplement]] block results in a different two-byte code (e.g. {{tt|0xC2,0x8E}} for {{tt|U+008E}}), but no space is saved this way. {| class="wikitable" |+ Some type {{tt|Fe}} (C1 set element) ANSI escape sequences (not an exhaustive list) |- ! Code!!C1!!Abbr!!Name!!Effect |- id=SS2 | {{tt|ESC N}} | {{tt|0x8E}} | {{tt|SS2}} | Single Shift Two | rowspan=2 | Select a single character from one of the [[ISO/IEC 2022#Code structure|alternative character sets]]. SS2 selects the G2 character set, and SS3 selects the G3 character set.<ref name="xtc"/> In a 7-bit environment, this is followed by one or more GL bytes (0x20β0x7F) specifying a character from that set.<ref name="ECMA-35"/>{{Rp|9.4}} In an 8-bit environment, these may instead be GR bytes (0xA0β0xFF).<ref name="ECMA-35"/>{{Rp|8.4}} |- id=SS3 | {{nobr|{{tt|ESC O}}}} | {{tt|0x8F}} | {{tt|SS3}} | Single Shift Three |- id=DCS | {{tt|ESC P}} | {{tt|0x90}} | {{tt|DCS}} | Device Control String | Terminated by ST.<ref name="ECMA-48"/>{{Rp|5.6}} Xterm's uses of this sequence include defining User-Defined Keys, and requesting or setting Termcap/Terminfo data.<ref name="xtc"/> |- id=CSI | {{tt|ESC [}} | {{tt|0x9B}} | {{tt|CSI}} | [[#CSIsection|Control Sequence Introducer]] | Starts most of the useful sequences, terminated by a byte in the range 0x40 through 0x7E.<ref name="ECMA-48"/>{{Rp|5.4}} |- id=ST | {{tt|ESC \}} | {{tt|0x9C}} | {{tt|ST}} | String Terminator | Terminates strings in other controls.<ref name="ECMA-48"/>{{Rp|8.3.143}} |- | {{tt|ESC ]}} | {{tt|0x9D}} | {{tt|OSC}} | [[#OSC|Operating System Command]] | Starts a control string for the operating system to use, terminated by ST.<ref name="ECMA-48"/>{{Rp|8.3.89}} |- id=SOS | {{tt|ESC X}} | {{tt|0x98}} | {{tt|SOS}} | Start of String | rowspan=3 | Takes an argument of a string of text, terminated by ST.<ref name="ECMA-48"/>{{Rp|5.6}} The uses for these string control sequences are defined by the application<ref name="ECMA-48"/>{{Rp|8.3.2,8.3.128}} or privacy discipline.<ref name="ECMA-48"/>{{Rp|8.3.94}} These functions are rarely implemented and the arguments are ignored by xterm.<ref name="xtc"/> Some [[Kermit (protocol)|Kermit]] clients allow the server to automatically execute Kermit commands on the client by embedding them in APC sequences; this is a potential security risk if the server is untrusted.<ref name="CruzGianone1997">{{cite book|author1=Frank da Cruz|author2=Christine Gianone|title=Using C-Kermit|url=https://books.google.com/books?id=QuYQPc-c67MC&pg=PA278|year=1997|publisher=Digital Press|isbn=978-1-55558-164-0|page=278}}</ref> |- id=PM | {{tt|ESC ^}} | {{tt|0x9E}} | {{tt|PM}} | Privacy Message |- id=APC | {{tt|ESC _}} | {{tt|0x9F}} | {{tt|APC}} | {{nobr|Application Program Command}} |} <!-- Parked a number of anchors here which are used in redirects to this page but are not yet discussed inhere. Move them a better place when the corresponding info gets incorporated here at a later stage --> {{anchor|CBT|CCH|CHT|CTC|CVT}} {{anchor|DA|DAQ|DCH|DL|DMI|EA|ECH|EF|EMI}} {{anchor|EPA|ESA|FNT|GSM|GSS|HPA|HPR|HTJ|HTS|ICH}} {{anchor|IL|IND|INT|JFY|MC|MW|NEL|NP|PLD}} {{anchor|PLU|PP|PU1|PU2|QUAD|REP|RI|RIS|RM}} {{anchor|SEM|SL|SM|SPA|SPI|SR|SSA}} {{anchor|STS|TBC|TSS|VPA|VPR|VTS}} {{anchor|SKR|KR}}
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