[99]
The ISO/IEC 2022 decoder steps ,
with
byte getter byte getter
and
state initialization steps initialization steps ,
are as follows:
[8] Let state be a new state .[1464] Let state 's input getter be the 8-bit input getter .[327] Modify character sets
of state for
« "fixed", "fallback", "iso2022" ».[6] Let output stream be a new output stream .[9] Run initialization steps with state .[1468] Let next be null
.[1456] While next is not end-of-file :[1457] If state 's current frame length is 0 :[1455] Set state 's current frame length to null
.[1458] Set next to an end-of-frame (false ).[1459] Otherwise:[1460] Set next to the result of running input getter
with byte getter .[1461] If next is end-of-file :[1462] If state 's current frame length is not null
:[1463] Set next to an end-of-frame (true ).[1466] Set state 's input getter to the empty input getter .[1469] Otherwise:[1471] If state 's current frame length is not null
:[1470] Set state 's current frame length to
state 's current frame length - 1.[1761] If state 's current capturing byte is not null
:[1762] Set
state 's macro set [ state 's current capturing byte ]
to
state 's macro set [ state 's current capturing byte ]
followed by next .[1792]
If state 's macro set [ state 's current capturing byte ]'s
length is greater than the
maximum sequence length :[1793] Error .[1942] Set state 's input getter to the 8-bit input getter .[1794] Set state 's opaque designated to the result of
getting a 256 set
unknown-byte , null
.[1795] Set state 's decoder state to opaque state .[1467] Process the next input character
with state , next .[7]
Return output stream .[1] A state is:
fixed set Character set .escape set Character set .macro set Ordered map .
Initially, an empty ordered map .94 final set Ordered map .
Initially, an empty ordered map .96 final set Ordered map .
Initially, an empty ordered map .94n final set Ordered map .
Initially, an empty ordered map .96n final set Ordered map .
Initially, an empty ordered map .94n final RL set Ordered map .
Initially, an empty ordered map .C0 designated C0 set . Initially, the initial C0 set .C1 designated C1 set . Initially, the empty C1 set .C1 override designated C1 set or null
.
Initially, null
.G0 designated G set , unknown-94 , or unknown-96 .
Initially, unknown-96 .G1 designated G set , unknown-94 , or unknown-96 .
Initially, unknown-96 .G2 designated G set , unknown-94 , or unknown-96 .
Initially, unknown-96 .G3 designated G set , unknown-94 , or unknown-96 .
Initially, unknown-96 .G0 RL designated 942 set or unknown-94 .
Initially, unknown-94 .G1 RL designated 942 set or unknown-94 .
Initially, unknown-94 .G2 RL designated 942 set or unknown-94 .
Initially, unknown-94 .G3 RL designated 942 set or unknown-94 .
Initially, unknown-94 .Gj designated 94 set . Initially, unknown-94 .S1 designated 942 set .S2 designated 942 set .left designated G set or 128 set .right designated 128 set .
Initially, the result of
getting a 128 set
unknown-byte , null
.opaque designated 256 set .CR invoked C element .
Initially, C1 .GL invoked G element or null
.
Initially, null
.GR invoked G element or null
.
Initially, null
.CL mode CL mode .
Initially, iso2022 .GL mode GL mode .
Initially, iso2022 .right mode A right mode .
Initially, iso2022 . shift plane 2 mode normal or jisx0213 .
Initially, normal .bits 8-bit or 7-bit .
Initially, 8-bit .XON/XOFF flag Boolean .
Initially, false .VT response flag Boolean .
Initially, false .ISO 4873 Latin-1 flag Boolean .
Initially, false .Unicode 1.1 flag Boolean .
Initially, false .UTF-8 GL flag Boolean .
Initially, false .LS0 by G0 designation flag Boolean .
Initially, false .data syntax 2 default mode serial or parallel .
Initially, serial .videotex basic kernel flag Boolean .
Initially, false .lib flag Boolean . Initially, false .current byte sequence Byte sequence .current element C element or G element .current size 94 or 96 .current bytes 1 , 2 , or 3 .current I byte Byte .current J byte Byte or null
.current revision byte Byte or null
.
Initially, null
.current segment length Non-negative integer or null
. current segment data Byte sequence .current capturing byte Byte
or null
.
Initially, null
.current macro Macro or null
.
Initially, null
.current frame length Non-negative integer or null
.
Initially, null
. current control sequence Character string .decoder state One of decoder states .
Initially, default state . previous state State or null
.
Initially, null
.previous GL mode GL mode or null
.
Initially, null
.previous left designated G set or 128 set .previous code point Code point or null
.
Initially, null
[223] A C element is C0 or C1 .
[100] A G element is G0 , G1 , G2 , G3 , or Gj .
[2242] A CL mode is one of:
iso2022 ,
single-esc ,
single-most-c0 ,
and
single-right-esc .
[1704] A GL mode is one of:
iso2022 ,
captain ,
unicode ,
telesoftware ,
single ,
and
single-right .
[1291] A right mode is one of:
iso2022 ,
iso2022jp ,
unicode ,
utf-1 , utf-8 ,
single ,
sjis ,
big5 ,
uhc , johab , hangultalk ,
gb18030 ,
and
x-moe-internal .
[117] A maximum sequence length is an implementation-specific integer,
e.g. 15 .
[94] A maximum chunk length is an implementation-specific integer,
e.g. 230 - 1.
[315]
To get invoked set with
state state and G element or null
element ,
run these steps:
[302] If element is null
:[303] Return unknown-96 .[304] Otherwise, if element is G0 :[305] Return state 's G0 designated .[306] Otherwise, if element is G1 :[307] Return state 's G1 designated .[308] Otherwise, if element is G2 :[309] Return state 's G2 designated .[310] Otherwise, if element is G3 :[311] Return state 's G3 designated .[796]
To get RL invoked set with
state state and G element or null
element ,
run these steps:
[797] If element is null
:[798] Return unknown-94 .[799] Otherwise, if element is G0 :[800] Return state 's G0 RL designated .[801] Otherwise, if element is G1 :[802] Return state 's G1 RL designated .[803] Otherwise, if element is G2 :[804] Return state 's G2 RL designated .[805] Otherwise, if element is G3 :[806] Return state 's G3 RL designated .[20] When the ISO/IEC 2022 decoder steps are invoked,
a set of steps, referred to as the state initialization steps ,
can be specified. There are the following requirements for them,
with state given by the ISO/IEC 2022 decoder steps :
[21] They MAY modify values of state 's
C0 designated ,
C1 designated ,
G0 designated ,
G1 designated ,
G2 designated ,
G3 designated ,
right designated ,
G0 RL designated ,
G1 RL designated ,
G2 RL designated ,
G3 RL designated ,
CR invoked ,
GL invoked ,
GR invoked ,
CL mode ,
GL mode ,
right mode ,
bits ,
VT response flag ,
ISO 4873 Latin-1 flag ,
Unicode 1.1 flag ,
UTF-8 GL flag ,
LS0 by G0 designation flag ,
data syntax 2 default mode ,
videotex basic kernel flag ,
and/or
input getter .[319] They MAY invoke the steps to modify character sets
of state for some features .[1898] They MAY set the state 's decoder state to
before BOM state
if state 's input getter is set to
the UCS-2BE input getter ,
the UCS-4BE input getter ,
or
the UTF-16BE input getter .[1950] They MAY run a macro with state and bytes ,
where bytes is any byte sequence .[1948] They MAY obtain a read-only access to
state 's macro set ,
which is valid until the end of the ISO/IEC 2022 decoder steps execution.
However, its entries MUST NOT be modified.[1951] They MUST discard any other reference to
state and values contained directly or indirectly by state
before they return.[807] If state 's G0 RL designated is set to a 942 set ,
state 's G0 designated MUST be set to a 942 set .[808] If state 's G1 RL designated is set to a 942 set ,
state 's G1 designated MUST be set to a 942 set .[809] If state 's G2 RL designated is set to a 942 set ,
state 's G2 designated MUST be set to a 942 set .[810] If state 's G3 RL designated is set to a 942 set ,
state 's G3 designated MUST be set to a 942 set .
input stream:
[1791]
An input item is
a byte ,
a character ,
end-of-frame , or
end-of-file .
[1818]
To get a UCS input item for c ,
with state of the steps to process the next input character ,
run these steps:
[1819] If c is in [ 0x00 , 0xFF ]:[1820] Return a bit combination whose value is c .[1905] Otherwise, if c is greater than 0x7FFFFFFF :[1906] Return
character (unicode , non-10646 , c ).[1821] Otherwise, if c is greater than 0x10FFFF :[1822] Return
character (unicode , non-unicode , c ).[1823] Otherwise:[1825]
If state 's Unicode 1.1 flag is true and
c is in [ 0x3400 , 0x4DFF ]:[1826] Return
character (unicode , 1.1 , c ).[1824] Return
a code point whose value is c .[1472]
An end-of-frame is a tuple of
incomplete (boolean ).
[1574]
A byte getter is a steps that returns a byte
or null
.
It represents an input byte stream.
Whenever invoked, it is expected to return a byte from the stream it represents,
in order. It is expected to return a null
after the end of the stream
is reached.
[1780]
An input getter is
the empty input getter ,
the 8-bit input getter ,
the SCSU input getter ,
the UCS-2BE input getter ,
the UCS-2LE input getter .
the UCS-4BE input getter ,
the UCS-4LE input getter ,
the UTF-16BE input getter ,
and
the UTF-16LE input getter .
[1779]
The empty input getter run these steps:
[1790] Return end-of-file .[1775]
An 8-bit input getter
run these steps with
state
and
byte getter byte getter :
[1785] Let byte be the result of running getter .[1786] If byte is null
:[1787] Return end-of-file .[1788] Otherwise:[1789] Return byte .[1069]
To get input bytes with
byte getter byte getter
and
integer n ,
run these steps:
[1070] Let bytes be an empty list .[1101] Let m be n .[1827] While m is greater than 0 :[1828] Let byte be the result of running
byte getter .[1829] If byte is null
:[1830] Return bytes .[1832] Abort these steps.[1831] Otherwise:[1833] Append byte to bytes .[1900] Set m to m - 1 .[1834] Return bytes .[2181]
The SCSU input getter
run these steps with
state and
byte getter byte getter :
[1796]
The UCS-2BE input getter
run these steps with
state and
byte getter byte getter :
[1835] Let bytes be the result of running the steps to
get input bytes with 2 and byte getter .[1836] If bytes 's length is 2 :[1805] Let c be bytes [ 0 ] × 0x100 + bytes [ 1 ].[1806] Return the result of
getting a UCS input item c .[1799] Otherwise, if bytes 's length is 0 :[1800] Return end-of-file .[1797] Otherwise:[1465] Set state 's input getter to the empty input getter .[1798] Return U+FFFD
.[1807]
The UCS-2LE input getter
run these steps with
state and
byte getter byte getter :
[1801] Let bytes be the result of running the steps to
get input bytes with 2 and byte getter .[1802] If bytes 's length is 2 :[1803] Let c be bytes [ 1 ] × 0x100 + bytes [ 0 ].[1804] Return the result of
getting a UCS input item c .[1808] Otherwise, if bytes 's length is 0 :[1809] Return end-of-file .[1810] Otherwise:[1811] Set state 's input getter to the empty input getter .[1849] Return U+FFFD
.[1812]
The UCS-4BE input getter
run these steps with
state and
byte getter byte getter :
[1813] Let bytes be the result of running the steps to
get input bytes with 4 and byte getter .[1814] If bytes 's length is 4 :[1815] Let c be
bytes [ 0 ] × 0x1000000 +
bytes [ 1 ] × 0x10000 +
bytes [ 2 ] × 0x100 +
bytes [ 3 ].[1816] Return the result of
getting a UCS input item c .[1817] Otherwise, if bytes 's length is 0 :[1837] Return end-of-file .[1838] Otherwise:[1839] Set state 's input getter to the empty input getter .[1850] Return U+FFFD
.[1840]
The UCS-4LE input getter
run these steps with
state and
byte getter byte getter :
[1841] Let bytes be the result of running the steps to
get input bytes with 4 and byte getter .[1842] If bytes 's length is 4 :[1843] Let c be
bytes [ 3 ] × 0x1000000 +
bytes [ 2 ] × 0x10000 +
bytes [ 1 ] × 0x100 +
bytes [ 0 ].[1844] Return the result of
getting a UCS input item c .[1845] Otherwise, if bytes 's length is 0 :[1846] Return end-of-file .[1847] Otherwise:[1848] Set state 's input getter to the empty input getter .[1851] Return U+FFFD
.[1852]
The UTF-16BE input getter
run these steps with
state
and
byte getter byte getter :
[1860] If state 's previous character is not null
:[1861] Let char be state 's previous character .[1862] Otherwise:[1853] Let char be the result of running the
UCS-2BE input getter with state and byte getter .[1854] [1858] Otherwise:[1877] Set state 's previous code point to null
.[1859] Return char .[1864]
The UTF-16LE input getter
run these steps with
state
and
byte getter byte getter :
[1865] If state 's previous character is not null
:[1866] Let char be state and state 's previous character .[1867] Otherwise:[1868] Let char be the result of running the
UCS-2LE input getter with byte getter .[1869] [1874] Otherwise:[1879] Set state 's previous code point to null
.[1875] Return char .[1778]
To process the next input character
with state and bc ,
run these steps:
[1784] Run state 's decoder state 's switch by bc ,
with state .[1766] If the previous step asked to reconsume bc :[1767] Go to the first step of these steps.[1783]
The variable state in these steps is accessible from
the steps
to get a UCS input item ,
to emit a character , and
to process a control character .
[97]
An output stream is a list .
The variable output stream of the steps of the
ISO/IEC 2022 decoder steps represents the output of the decoder.
It is accessible from the steps
to emit a character and
to emit the EOF .
[1768]
When ISO/IEC 2022 decoder steps returns,
output stream
contains
zero or more characters
followed by
an EOF .
[4]
To emit a character with character char ,
with state of the steps to process the next input character ,
run these steps:
[115] If char is
character (videotex , 96 , 7/0 , bc )
where bc is a bit combination :[116] If state 's macro set [ bc ] exists :[1782] Run a macro
with state ,
state 's macro set [ bc ]. [1781] Otherwise:[2184] If char is CSI
:[2185]
Set state 's current control sequence to
a character string of char .[2186] Otherwise, if char
is
character (param , bc ):[2187]
Append
char
to
state 's current control sequence .[2188]
If bc is in [ 4/0 , 7/14 ]:[2189]
Run the control sequence for state .[5]
Append
char
to
output stream .[1769]
To emit the EOF , run these steps:
[1770]
Append
an EOF
to
output stream .[1774]
Although the steps of the ISO/IEC 2022 decoder steps is written in the form
of the steps to return an output stream ,
any character or EOF in output stream
MAY be made accessible from the application
as soon as it is appended to output stream .
The steps of the ISO/IEC 2022 decoder steps never modify or rearrange
appended characters .
[355]
When error , run these steps:
[356] An error may be reported to a developer console .[153] Emit a character U+FFFD
.[58]
When deprecated , run these steps:
[59] A warning may be reported to a developer console .[719]
To process a control character char ,
with state of the steps to process the next input character ,
switch by char :
ESC
[30] Set state 's decoder state to escape state .CSI
[2087] Emit char .[2085] Set state 's decoder state to CSI state .LS0
[209] Set state 's GL invoked to G0 .LS1
[1280] If state 's GL invoked is Gj :[1281] Set state 's GL invoked to G0 .[1282] Otherwise:[212] Set state 's GL invoked to G1 .LS2
[750] Set state 's GL invoked to G2 .LS3
[752] Set state 's GL invoked to G3 .LS1R
[61] If state 's bits is 7-bit :[101] Set state 's GL invoked to G1 .[102] Otherwise:[127] Set state 's GR invoked to G1 .LS2R
[129] If state 's bits is 7-bit :[130] Set state 's GL invoked to G2 .[131] Otherwise:[132] Set state 's GR invoked to G2 .LS3R
[754] If state 's bits is 7-bit :[133] Set state 's GL invoked to G3 .[134] Otherwise:[135] Set state 's GR invoked to G3 .SS2
[226] Set state 's current element to G2 .[214] Set state 's decoder state to SS state .SS3
[227] Set state 's current element to G3 .[216] Set state 's decoder state to SS state .EXT1
[1718] Set state 's decoder state to EXT1 state .(marc , esc , bc ) where bc is a bit combination [103] Deprecated .[31] Set state 's G0 designated to
state 's 94 final set [ 1/11 followed by bc ]. [968] Set state 's G0 RL designated to unassigned-94 .[1973] If state 's LS0 by G0 designation flag is true :[1974] Set state 's GL invoked to G0 .(vt , C1 , bc ) where bc is 8/6 or 8/7 [789] Set state 's G0 designated to
state 's 94 final set [ bc ]. [969] Set state 's G0 RL designated to unassigned-94 .[1975] If state 's LS0 by G0 designation flag is true :[1976] Set state 's GL invoked to G0 .(vt , esc , 3/12 ) [785] Modify character sets
of state for
« "iso2022", "vt" ».[786] Emit char .(tektronix , esc , 0/3 ) [718] Set state 's C1 designated to the result of
getting a C set with C1 , vt , C1 .[677] Modify character sets
of state for
« "noescc0", "vt" ».[738] Emit char .(vt , esc , 7/11 ) [679] Set state 's decoder state to file state .(C0 , bytes , 1/15 ) where bytes is in [ 4/9 , 4/11 ] [182] Set state 's current I byte to bytes .[199] Set state 's decoder state to US state .(videotex , sound-control , bytes ) where bytes is one of 8/0 , 8/1 , 8/2 , 8/8 , 8/9 , 8/12 , 9/0 , and 9/12 [1497] Emit char .[1483] Set state 's decoder state to sound control parameter state .(videotex , sound-control , bytes ) where bytes is 8/10 or 8/11 [1498] Emit char .[1484] Set state 's decoder state to sound control state .(vt52 , esc , 6/2 ), (vt52 , esc , 6/3 ), (C0 , 4/9 , 1/4 ), (C1 , 4/4 , bc ) where bc is 8/11 , 9/0 , 9/1 , or 9/2 , (C0 , 4/10 , 1/2 ), (dtvcc , C0 , bc ) where bc is in [ 1/0 , 1/7 ], (dtvcc , C1 , bc ) where bc is in [ 8/8 , 8/13 ], (dtvcc , C2 , bc ) where bc is in [ 0/8 , 0/15 ] [210] Emit char .[211] Set state 's decoder state to control parameter state .[1742] Set state 's current segment length to 1 .(vt52 , C1 , 9/9 ), (C0 , C0 , 1/12 ), (dtvcc , C0 , bc ) where bc in [ 1/8 , 1/15 ], (dtvcc , C1 , bc ) where bc is 9/0 or 9/2 , (dtvcc , C2 , bc ) where bc is in [ 1/0 , 1/7 ] [1499] Emit char .[722] Set state 's decoder state to control parameter state .[1743] Set state 's current segment length to 2 .(dtvcc , C1 , 9/1 ), (dtvcc , C2 , bc ) where bc is in [ 1/8 , 1/15 ] [229] Emit char .[681] Set state 's decoder state to control parameter state .[1744] Set state 's current segment length to 3 .(dtvcc , C1 , 9/7 ), (dtvcc , C3 , bc ) where bc is in [ 8/0 , 8/7 ] [724] Emit char .[732] Set state 's decoder state to control parameter state .[1745] Set state 's current segment length to 4 .(dtvcc , C3 , bc ) where bc is in [ 8/8 , 8/15 ] [735] Emit char .[736] Set state 's decoder state to control parameter state .[1746] Set state 's current segment length to 5 .(dtvcc , C1 , bc ) where bc is in [ 9/8 , 9/15 ] [737] Emit char .[771] Set state 's decoder state to control parameter state .[1747] Set state 's current segment length to 6 .(dtvcc , C3 , bc ) where bc is in [ 9/0 , 9/15 ] [772] Emit
character (dtvcc , C3 , bc & 0b11100000 ).[771] Set state 's decoder state to control parameter state .[1747] Set state 's current segment length to bc & 0b00011111 .(dtvcc , C2 , bc ) where bc in [ 0/8 , 0/15 (C1 , 4/0 , bc ) where bc is in [ 8/0 , 8/7 ] [1538] Emit char .[1539] Set state 's GL mode to iso2022 .(C1 , 4/0 , bc ) where bc is in [ 9/0 , 9/7 ] [1536] Emit char .[1537] Set state 's GL mode to single .[1112] Set state 's left designated to the result of
getting a G set with
96 , 1 , videotex , l .P-MACRO
[1166] Set state 's decoder state to macro state .DCS
, OSC
, PM
, APC
[2010] Emit char .[2009] Set state 's decoder state to command state .SOS
[1707] Emit char .[1705] Set state 's previous GL mode to state 's GL mode .[1713] Set state 's previous left designated
to state 's left designated .[1706] Set state 's GL mode to iso2022 .ST
[1711] Emit char .[1709] If state 's previous GL mode is not null
:[1708] Set state 's GL mode to state 's previous GL mode .[1714] Set state 's left designated to
state 's previous left designated .[1710] Set state 's previous GL mode to null
.(esc , 6/3 ) [2123] Emit char .[2124] Set state 's GL invoked to G0 .[2125] Set state 's G0 designated to the result of
getting a G set with
94 , 1 , 94 , 4/2 .PCD
[729] Emit char .[65] Set state 's decoder state to PCD state .SCI
[2017] Set state 's decoder state to SCI state .CMD
[730] Emit char .[1943] Set state 's input getter to the 8-bit input getter .[1272] Set state 's opaque designated to the result of
getting a 256 set
unknown-byte , null
.[48] Set state 's decoder state to opaque state .(unknown-control , null
, bytes ) where bytes is a byte sequence [660] Emit char .[1944] Set state 's input getter to the 8-bit input getter .[1273] Set state 's opaque designated to the result of
getting a 256 set
unknown-byte , null
.[659] Set state 's decoder state to opaque state .(deprecated , c ) where c is a character [756] Deprecated .[755] Process c .Otherwise [13] Emit char .[2220]
A SGR is a character string which is the
concatenation of the followings, in order:
CSI
Zero or more sequence of character (param , bc )
where bc is a bit combination Character (param , 6/13 )and the concatenation of bc , in order, is referred to as
params of the SGR .
[2229]
To process SGR attribute attr with state , run these steps:
[2230]
Switch by attr :3/1 followed by 3/0 [2234] If state 's right mode is single :[2255] Set state 's CL mode to iso2022 .[2235] Set state 's GL mode to single .[2258] Otherwise:[2259] Set state 's G0 designated to the result of
getting a G set with
94 , 1 , 94 , 4/2 .[2260] Set state 's GL invoked to G0 .3/1 followed by 3/1 [2236] If state 's right mode is single :[2256] Set state 's CL mode to single-esc .[2239] Set state 's GL mode to single .3/1 followed by 3/2 [2240] If state 's right mode is single :[2257] Set state 's CL mode to single-right-esc .[2241] Set state 's GL mode to single-right .[2261] Otherwise:[2264] Let set be the result of
getting invoked set with
state and state 's GR invoked .[2262] Set state 's G2 designated to set .[2263] Set state 's GR invoked to G2 . [2192]
A DECPCTERM is a character string which is the
concatenation of the followings, in order:
CSI
Character (param , 3/15 )Optionally, character (param , ps1 ) Character (param , 3/11 )Optionally, either: Character (param , 7/2 )... where each of ps1 , ps2 , ps21 , ps22 , and ps23
is a bit combination . If omitted,
they are considered as null
.
[2215]
A DECSFC is a character string which is the
concatenation of the followings, in order:
CSI
Optionally, character (param , ps1 ) Character (param , 3/11 )Optionally, character (param , ps2 ) Character (param , 3/11 )Optionally, character (param , ps3 ) Character (param , 3/11 )Optionally, character (param , ps4 ) Character (param , 3/11 )Character (param , 2/10 )Character (param , 7/3 )... where each of ps1 , ps2 , ps3 , and ps4
is a bit combination . If omitted,
they are considered as null
.
[2265]
A DECSPPCS is a character string which is the
concatenation of the followings, in order:
CSI
Zero or more sequence of character (param , bc )
where bc is a bit combination Character (param , 2/10 )Character (param , 7/0 )and the concatenation of bc , in order, is referred to as
pn of the DECSPPCS .
[2190]
To
run the control sequence
for
state ,
run these steps:
[2231]
If state 's current control sequence 's length
is greater than the maximum sequence length :[2232]
Abort these steps.[2191]
Switch by
state 's current control sequence :DECPCTERM with ps1 , ps2 , ps21 , ps22 , ps23 [2193]
If ps1 is null
or ps1 is 3/1 :[2195]
Set state 's GL mode to iso2022 .[2209]
Set state 's right mode to iso2022 .[2194]
Otherwise, if ps1 is 3/2 :[2210]
Set state 's GL mode to single .[2196]
Set state 's right mode to single .[2197]
If either ps2 is null
and ps21 is null
,
or ps2 is 3/0 :[2206] Do nothing.[2198] Otherwise, if ps21 is null
:[2202]
If state 's right mode is single :[2237]
Set state 's GL mode to iso2022 .[2200]
Set state 's left designated to
the result of
getting a 128 set with
vt-left , ps2 .[2201]
Set state 's right designated to
the result of
getting a 128 set with
vt-right , ps2 .[2211]
Set state 's G0 designated to
the result of
getting a 94 set with
vt-left , ps2 .[2212]
Set state 's G1 designated to
the result of
getting a 94 set with
vt-right , ps2 .[2213]
Set state 's GL invoked to G0 .[2214]
Set state 's GR invoked to G1 .[2199] Otherwise, if ps2 is null]:
[2208]
If state 's right mode is single :[2238]
Set state 's GL mode to single .[2204] Set ps2 to
ps21 followed by ps22 followed by ps23 .[2207]
Set state 's left designated to
the result of
getting a 128 set with
vt-left , ps2 .[2205]
Set state 's right designated to
the result of
getting a 128 set with
vt-right , ps2 .DECSFC with ps3 [2216]
If ps3 is null
, 3/0 , or 3/1 :[2217]
Set state 's XON/XOFF flag to true .[2218]
Otherwise:[2219]
Set state 's XON/XOFF flag to false .SGR with params [2221] Let item be an empty byte sequence .[2222] For each byte in params :[2223] If byte is 3/11 :[2224] Process SGR attribute item
with state .[2226] Set item to an empty byte sequence .[2225] Otherwise:[2227] Append byte to item .[2228] Process SGR attribute item
with state .DECSPPCS with pn [2266]
Set state 's left designated to
the result of
getting a 128 set with
pcs-left , pn .[2267]
Set state 's right designated to
the result of
getting a 128 set with
pcs-right , pn .[1764]
A macro is a byte sequence .
[1765]
In this document,
a macro might be represented as a string ,
which is a list of tokens separated by a U+0020
character .
A token is either a bit combination or
a token from the following table.
A bit combination represents itself.
One of token values in the following table
represents the cell value of the bytes column in the same table row.
The list represents a macro that is the concatenation
of the bit combinations (including those in bytes ),
in order.
[1429] To run a macro with state and bytes , run these steps:
[1776] For each bc in the bit combinations of
bytes , in order:[1777] Process the next input character
with state , bc .[1451]
To initialize by DI state , run these steps:
[1452] If state 's current I byte is 2/0 :[932] Set state 's GL mode to iso2022 .[1437] Set state 's decoder state to default state .[1422] Run a macro with
state ,
"ESC 2/1 4/9 ESC 2/2 4/4 ESC 2/6 4/0 ESC 2/4 4/2 ESC 2/9 4/10 ESC 2/14 3/8 ESC 2/11 2/0 4/1 LS0 LS2R".[1424] Otherwise, if state 's current I byte is 4/1 :[1475] Set state 's GL mode to iso2022 .[1476] Set state 's decoder state to default state .[1477] Run a macro with
state ,
"ESC 2/1 4/9 LS0".[1478] Set state 's C1 designated to the result of
getting a C set with
C1 , videotex , sound-control .[1479] Set state 's G0 designated to the result of
getting a G set with
96 , 1 , videotex , sound-tone .[1425] Otherwise, if state 's current I byte is 4/0 :[1482] Set state 's GL mode to iso2022 .[1481] Set state 's decoder state to default state .[1480] Run a macro with
state ,
"ESC 2/1 4/9 ESC 2/2 4/4 ESC 2/8 4/9 ESC 2/6 4/0 ESC 2/4 2/9 4/2 ESC 2/10 4/10 LS0 LS2R".[1426] Otherwise:[1945] Set state 's input getter to the 8-bit input getter .[1445] Set state 's opaque designated to the result of
getting a 256 set
captain , state 's current I byte .[1454] Set state 's decoder state to opaque state .[1527]
To initialize data syntax 2 with
state
and
serial , parallel , or null
mode ,
run these steps:
[1651] Modify character sets
of state for
« "iso2022", "videotex" ».[1543] Set state 's GL mode to iso2022 .[1528] Run a macro with
state ,
"ESC 2/1 4/10 ESC 2/8 4/0 ESC 2/9 6/3 ESC 2/10 6/2 ESC 2/11 6/4 LS0 LS2R".[1529] If mode is serial :[1530] Run a macro with
state , "ESC 2/2 4/0".[1531] Otherwise, if mode is parallel :[1532] Run a macro with
state , "ESC 2/2 4/1".[1533] Set state 's decoder state to default state .[27]
The decoder has several decoder states for processing input
bit combinations .
[2]
Each decoder state has its switch .
There are the following decoder states :
[3] The default state switches by the bit combination bc :
[ 0/0 , 1/15 ] [2243] If state 's CL mode is single-esc or single-right-esc :[2248] If bc is 1/11 :[2249] Process a control character
ESC
.[2252] Otherwise, if bc is 1/1 or 1/3 and
state 's XON/XOFF flag is true :[2253] Let set be state 's C0 designated .[2254] Process a control character
set [ bc ].[2250] Otherwise:[2245] If state 's CL mode is single-right-esc :[2244] Set set to state 's right designated .[2251] Otherwise:[2244] Set set to state 's left designated .[2246] Emit a character set [ bc ].[2268] Otherwise, if state 's CL mode is single-most-c0 :[2269] If bc is one of:
0/7 , 0/8 , 0/9 , 0/10 , 0/13 , and 1/11 :[2270] Process a control character
set [ bc ].[2271] Otherwise:[2272] Emit a character set [ bc ].[2247] Otherwise: [11] Let set be state 's C0 designated .[717] Process a control character
set [ bc ].[ 2/0 , 7/15 ] [1420] If state 's GL mode is captain :[1427] Set state 's current I byte to bc .[1428] Set state 's decoder state to CAPTAIN DI state .[1613] Otherwise, if state 's GL mode is telesoftware :[1577] Emit
character (videotex , telesoftware-ci , bc ).[1612] If state 's videotex basic kernel flag is false :[1578] Set state 's decoder state to TELESOFTWARE CI state .[1915] Otherwise, if state 's GL mode is unicode :[1916] Emit a code point whose value is bc .[1712] Otherwise:[1109] If state 's GL mode is single :[1079] Let set be state 's left designated .[2203] Otherwise, if state 's GL mode is single-right :[2233] Let set be state 's right designated .[1080] Otherwise, if state 's GL mode is iso2022 :[314] Let set be the result of
getting invoked set with
state and state 's GL invoked .[1288] If state 's right mode is iso2022jp and
bc is 7/15 :[1289] Set state 's decoder state to foreign right state .[1290] Reconsume bc .[507] Otherwise, if is 96 size set is false and
bc is 2/0 or 7/15 :[318] Emit a character
state 's fixed set [ bc ].[422] Otherwise, if set is unknown-94 or unknown-96 :[440] Set state 's decoder state to left unassigned state .[441] Reconsume bc .[424] Otherwise:[448] Set state 's current bytes to set 's byte length .[449] If state 's current bytes is 1 :[185] Emit a character set [ bc ].[450] Otherwise:[451] Set state 's current I byte to bc .[487] Set state 's current J byte to null
.[452] Set state 's decoder bytes to left leading byte state .[ 8/0 , 9/15 ] [1081] If state 's right mode is iso2022 or unicode :[834] If state 's CR invoked is C1 :[1559] If state 's C1 override designated is null
:[26] Let set be state 's C1 designated .[1560] Otherwise:[1561] Let set be state 's C1 override designated .[28] Process a control character
set [ bc ].[835] Otherwise, if state 's CR invoked is C0 :[836] Let set be state 's C0 designated .[837] Process a control character
set [ bc & 0b01111111 ].[1914] Otherwise:[1082] Set state 's decoder state to foreign right state .[1083] Reconsume bc .[ 10/0 , 15/15 ] [334] Let set be the result of
getting invoked set with
state and state 's GR invoked .[1084] If state 's right mode is iso2022 :[312] If is 96 size set is false and
bc is 10/0 or 15/15 :[317] Emit a character
state 's fixed set [ bc ].[313] Otherwise, if set is unknown-94 or unknown-96 :[423] Set state 's decoder state to right unassigned state .[430] Reconsume bc .[431] Otherwise:[432] Set state 's current bytes to set 's byte length .[471] If state 's current bytes is 1 :[473] Emit a character
set [ bc & 0b01111111 ].[474] Otherwise:[475] Set state 's current I byte to bc & 0b01111111 .[490] Set state 's current J byte to null
.[476] Set state 's decoder bytes to right leading byte state .[1911] Otherwise, if state 's right mode is unicode :[1912] Emit a code point whose value is bc .[1913] Otherwise:[1085] Set state 's decoder state to foreign right state .[1086] Reconsume bc .end-of-frame [1473] If bc 's incomplete is true :[1474] Error .[1423] Set state 's GL mode to captain .[1421] Set state 's decoder state to default state .end-of-file [1772] Emit the EOF .Otherwise [1773] Emit a character bc .[1719] The EXT1 state switches by the bit combination bc :
[ 0/0 , 1/15 ] [1720] Let set be the result of
getting a C set
C0 , dtvcc , C2 .[1722] Process a control character
set [ bc ].[ 2/0 , 7/15 ] [1721] Let set be the result of
getting a G set
96 , 1 , dtvcc , G2 .[1722] Emit
set [ bc ].[ 8/0 , 9/15 ] [1723] Let set be the result of
getting a C set
C1 , dtvcc , C3 .[1724] Process a control character
set [ bc ].[ 10/0 , 15/15 ] [1725] Let set be the result of
getting a G set
96 , 1 , dtvcc , G3 .[1726] Emit
set [ bc ].Otherwise [1727] Error .[1728] Set state 's decoder state to default state .[1729] Reconsume bc .[482] The left leading byte state switches by the bit combination bc :
[ 2/0 , 7/15 ] [495] Let set be the result of
getting invoked set with
state and state 's GL invoked .[320] If is 96 size set is false and
bc is 2/0 or 7/15 :[323] Emit
character (unknown-byte , null
, state 's current I byte ).[324] If state 's current J byte is not null
:[325] Emit
character (unknown-byte , null
, state 's current J byte ).[328] Set state 's decoder state to default state .[330] Reconsume bc .[321] Otherwise:[496] Set state 's current bytes to set 's byte length .[449] If state 's current bytes is 2 :[331] Let bytes be
state 's current I byte followed by bc .[498] Emit a character set [ bytes ].[336] Set state 's decoder state to default state .[499] Otherwise, if state 's current bytes is 3 :[502] If state 's current J byte is null
:[503] Set state 's current J byte to bc .[504] Otherwise:[335] Let bytes be
state 's current I byte followed by
state 's current J byte followed by bc .[501] Emit a character set [ bytes ].[337] Set state 's decoder state to default state .Otherwise [492] Emit
character (unknown-byte , null
, state 's current I byte ).[493] If state 's current J byte is not null
:[494] Emit
character (unknown-byte , null
, state 's current J byte ).[483] Set state 's decoder state to default state .[485] Reconsume bc .[338] The right leading byte state switches by the bit combination bc :
[ 2/1 , 7/14 ] [648] Let set be the result of
getting RL invoked set with
state and state 's GR invoked .[649] If set is unassigned-94 :[792] Emit
character (unknown-byte , null
, state 's current I byte ).[793] Set state 's decoder state to default state .[794] Reconsume bc .[795] Otherwise:[650] Let bytes be
state 's current I byte followed by bc .[651] Emit a character set [ bytes ].[687] Set state 's decoder state to default state .[ 10/0 , 15/15 ] [339] Let set be the result of
getting invoked set with
state and state 's GR invoked .[340] If is 96 size set is false and
bc is 10/0 or 15/15 :[421] Emit
character (unknown-byte , null
, state 's current I byte ).[426] If state 's current J byte is not null
:[427] Emit
character (unknown-byte , null
, state 's current J byte ).[428] Set state 's decoder state to default state .[429] Reconsume bc .[433] Otherwise:[434] Set state 's current bytes to set 's byte length .[436] If state 's current bytes is 2 :[437] Let bytes be
state 's current I byte followed by bc & 0b01111111 .[453] Emit a character set [ bytes ].[454] Set state 's decoder state to default state .[455] Otherwise, if state 's current bytes is 3 :[456] If state 's current J byte is null
:[457] Set state 's current J byte to bc & 0b01111111 .[458] Otherwise:[459] Let bytes be
state 's current I byte followed by
state 's current J byte followed by bc & 0b01111111 .[461] Emit a character set [ bytes ].[462] Set state 's decoder state to default state .Otherwise [464] Emit
character (unknown-byte , null
, state 's current I byte ).[465] If state 's current J byte is not null
:[466] Emit
character (unknown-byte , null
, state 's current J byte ).[467] Set state 's decoder state to default state .[468] Reconsume bc .[469] The SS leading byte state switches by the bit combination bc :
[ 2/0 , 7/15 ], [ 10/0 , 15/15 ] [470] If state 's current element is G2 :[525] Let set be state 's G2 designated .[526] If state 's current element is G3 :[527] Let set be state 's G3 designated .[477] If is 96 size set is false and
bc is 2/0 , 7/15 , 10/0 , or 15/15 :[478] Error .[479] Emit
character (unknown-byte , null
, state 's current I byte ).[480] If state 's current J byte is not null
:[481] Emit
character (unknown-byte , null
, state 's current J byte ).[486] Set state 's decoder state to default state .[488] Reconsume bc .[489] Otherwise:[491] Set state 's current bytes to set 's byte length .[505] If state 's current bytes is 2 :[506] Let bytes be
state 's current I byte followed by bc & 0b01111111 .[509] Emit a character set [ bytes ].[510] Set state 's decoder state to default state .[511] Otherwise, if state 's current bytes is 3 :[512] If state 's current J byte is null
:[513] Set state 's current J byte to bc & 0b01111111 .[514] Otherwise:[515] Let bytes be
state 's current I byte followed by
state 's current J byte followed by bc & 0b01111111 .[517] Emit a character set [ bytes ].[518] Set state 's decoder state to default state .Otherwise [519] Error .[520] Emit
character (unknown-byte , null
, state 's current I byte ).[521] If state 's current J byte is not null
:[522] Emit
character (unknown-byte , null
, state 's current J byte ).[523] Set state 's decoder state to default state .[524] Reconsume bc .[137] The escape announce state switches by the bit combination bc :
[ 3/0 , 3/5 ], [ 3/8 , 3/15 ] [828] Set state 's decoder state to default state .[829] Process
character (unknown-control , null
,
1/11 followed by 2/0 followed by bc ).3/6 [387] Deprecated .[833] Set state 's CR invoked to C0 .[381] Set state 's decoder state to default state .3/7 [830] Deprecated .[832] Set state 's CR invoked to C1 .[831] Set state 's decoder state to default state .[ 4/1 , 7/14 ] [138] Let announce be bc - 0x40.[139] If announce is one of:
1 ,
3 ,
12 ,
13 ,
or
14 :[140] Set state 's GL invoked be G0 .[141] If announce is 1 or 2 :[142] Set state 's GR invoked be null
.[143] If announce is one of:
3 ,
12 ,
13 ,
or
14 :[144] Set state 's GR invoked be G1 .[145] If announce is one of:
12 ,
13 ,
or
14 :[146] Set state 's 2/0 designated be SP
.[147] Set state 's 7/14 designated be DEL
.[838] If state 's ISO 4873 Latin-1 flag is true :[839]
Run a macro
with
state ,
"ESC
2/8 4/2 ESC
2/13 4/1 ".[148] If announce is one of:
11 ,
12 ,
13 ,
or
14 :[149] Set state 's bits be 8-bit .[150] If announce is 10 :[151] Set state 's bits be 7-bit .[380] Set state 's decoder state to default state .Otherwise [152] Set state 's current byte sequence to 2/0 .[155] Set state 's decoder state to escape unassigned state .[154] Reconsume bc .[399] The escape ctext version state switches by the bit combination
bc :
3/0 [401] Set state 's decoder state to default state .3/1 [400] Error .[403] Set state 's decoder state to default state .[ 3/2 , 3/15 ] [751] Set state 's decoder state to default state .[753] Process
character (unknown-control , null
,
1/11 followed by 2/3 followed by state 's current I byte
followed by bc ).[ 4/0 , 5/15 ] [1363] If state 's current I byte is 2/0 or 2/1 :[1369] Let set be the result of
getting a C set with
C1 , videotex , state 's current I byte .[1370] Emit a character [ bc + 0x40 ].[1371] Set state 's decoder state to default state .[1364] Otherwise:[1365] Error .[1946] Set state 's input getter to the 8-bit input getter .[1366] Set state 's opaque designated to the result of
getting a 256 set
unknown-byte , null
.[1367] Set state 's decoder state to opaque state .[1368] Reconsume bc .Otherwise [404] Error .[1947] Set state 's input getter to the 8-bit input getter .[1274] Set state 's opaque designated to the result of
getting a 256 set
unknown-byte , null
.[407] Set state 's decoder state to opaque state .[408] Reconsume bc .[236] The escape graphic state switches by the bit combination bc :
[ 2/0 , 2/6 ] [254] Set state 's current I byte to bc .[255] Set state 's decoder state to escape graphic I state .[ 3/0 , 7/14 ] [1298] If state 's current revision byte is null
:[1301] Set bytes be bc .[1300] Otherwise:[1299] Set bytes be
bc followed by state 's current revision byte .[237] If state 's current element is G0 :[402] If
state 's VT response flag is true ,
state 's current size is 94 , and
bc is 3/1 :[410] Emit a character
(vt , 2/8 , bc ).[411] Otherwise:[41] If state 's current size is 94 :[238] Set state 's G0 designated to
state 's 94 final set [ bytes ].[46] Otherwise, if state 's current size is 96 :[47] Set state 's G0 designated to
state 's 96 final set [ bytes ].[964] Set state 's G0 RL designated to unassigned-94 .[1977] If state 's LS0 by G0 designation flag is true :[1978] Set state 's GL invoked to G0 .[239] Otherwise, if state 's current element is G1 :[412] If
state 's VT response flag is true ,
state 's current size is 94 , and
bc is 3/1 :[413] Emit a character
(vt , 2/9 , bc ).[414] Otherwise:[64] If state 's current size is 94 :[66] Set state 's G1 designated to
state 's 94 final set [ bytes ].[119] Otherwise, if state 's current size is 96 :[183] Set state 's G1 designated to
state 's 96 final set [ bytes ].[965] Set state 's G1 RL designated to unassigned-94 .[286] Otherwise, if state 's current element is G2 :[184] If state 's current size is 94 :[200] Set state 's G2 designated to
state 's 94 final set [ bytes ].[201] Otherwise, if state 's current size is 96 :[202] Set state 's G2 designated to
state 's 96 final set [ bytes ].[966] Set state 's G2 RL designated to unassigned-94 .[288] Otherwise, if state 's current element is G3 :[417] If
state 's VT response flag is true and
state 's current size is 96 :[418] Emit a character
(vt , 2/15 , bc ).[419] Otherwise:[203] If state 's current size is 94 :[219] Set state 's G3 designated to
state 's 94 final set [ bytes ].[220] Otherwise, if state 's current size is 96 :[221] Set state 's G3 designated to
state 's 96 final set [ bytes ].[967] Set state 's G3 RL designated to unassigned-94 .[383] Set state 's decoder state to default state .Otherwise [166] If state 's current size is 94 :[241] Let set be unknown-94 .[415] Otherwise, if state 's current size is 96 :[416] Let set be unknown-96 .[242] If state 's current element is G0 :[243] Set state 's G0 designated to set .[960] Set state 's G0 RL designated to unassigned-94 .[1979] If state 's LS0 by G0 designation flag is true :[1980] Set state 's GL invoked to G0 .[244] Otherwise, if state 's current element is G1 :[160] Set state 's G1 designated to set .[961] Set state 's G1 RL designated to unassigned-94 .[246] Otherwise, if state 's current element is G2 :[161] Set state 's G2 designated to set .[962] Set state 's G2 RL designated to unassigned-94 .[248] Otherwise, if state 's current element is G3 :[165] Set state 's G3 designated to set .[963] Set state 's G3 RL designated to unassigned-94 .[251] Set state 's decoder state to escape trailer state .[252] Reconsume bc .[253] The escape graphic I state switches by the bit combination bc :
[ 3/0 , 7/14 ] [1302] If state 's current revision byte is null
:[1303] Set bytes be
state 's current I byte
followed by bc
followed by state 's current revision byte .[1304] Otherwise:[1305] Set bytes be
state 's current I byte
followed by bc .[257] If state 's current element is G0 :[222] If state 's current size is 94 :[240] Set state 's G0 designated to
state 's 94 final set [ bytes ].[256] Otherwise, if state 's current size is 96 :[275] Set state 's G0 designated to
state 's 96 final set [ bytes ].[258] Otherwise, if state 's current element is G1 :[259] If state 's current size is 94 :[276] Set state 's G1 designated to
state 's 94 final set [ bytes ].[287] Otherwise, if state 's current size is 96 :[289] Set state 's G1 designated to
state 's 96 final set [ bytes ].[290] Otherwise, if state 's current element is G2 :[291] If state 's current size is 94 :[293] Set state 's G2 designated to
state 's 94 final set [ bytes ].[678] Otherwise, if state 's current size is 96 :[690] Set state 's G2 designated to
state 's 96 final set [ bytes ].[292] Otherwise, if state 's current element is G3 :[691] If state 's current size is 94 :[692] Set state 's G3 designated to
state 's 94 final set [ bytes ].[693] Otherwise, if state 's current size is 96 :[694] Set state 's G3 designated to
state 's 96 final set [ bytes ].[384] Set state 's decoder state to default state .Otherwise [247] If state 's current size is 94 :[260] Let set be unknown-94 .[250] Otherwise, if state 's current size is 96 :[249] Let set be unknown-96 .[261] If state 's current element is G0 :[262] Set state 's G0 designated to set .[956] Set state 's G0 RL designated to unassigned-94 .[1981] If state 's LS0 by G0 designation flag is true :[1982] Set state 's GL invoked to G0 .[263] Otherwise, if state 's current element is G1 :[264] Set state 's G1 designated to set .[957] Set state 's G1 RL designated to unassigned-94 .[265] Otherwise, if state 's current element is G2 :[266] Set state 's G2 designated to set .[958] Set state 's G2 RL designated to unassigned-94 .[267] Otherwise, if state 's current element is G3 :[268] Set state 's G3 designated to set .[959] Set state 's G3 RL designated to unassigned-94 .[269] Set state 's decoder state to escape trailer state .[270] Reconsume bc .[599] The escape multiple state switches by the bit combination bc :
2/8 [606] Set state 's current element to G0 .[607] Set state 's current size to 94 .[608] Set state 's decoder state to escape multiple graphic state .2/9 [609] Set state 's current element to G1 .[610] Set state 's current size to 94 .[611] Set state 's decoder state to escape multiple graphic state .2/10 [612] Set state 's current element to G2 .[613] Set state 's current size to 94 .[614] Set state 's decoder state to escape multiple graphic state .2/11 [618] Deprecated .[619] Set state 's current element to G3 .[620] Set state 's current size to 94 .[621] Set state 's decoder state to escape multiple graphic state .2/12 [622] Set state 's current element to G0 .[623] Set state 's current size to 96 .[624] Set state 's decoder state to escape multiple graphic state .2/13 [625] Set state 's current element to G1 .[626] Set state 's current size to 96 .[627] Set state 's decoder state to escape multiple graphic state .2/14 [628] Set state 's current element to G2 .[629] Set state 's current size to 96 .[630] Set state 's decoder state to escape multiple graphic state .2/15 [631] Set state 's current element to G3 .[615] Set state 's current size to 96 .[616] Set state 's decoder state to escape multiple graphic state .3/0 , [ 3/2 , 4/4 ], [ 4/8 , 4/14 ], [ 5/2 , 7/14 ][1310] If state 's current revision byte is null
:[1311] Set bytes be bc .[1312] Otherwise:[1313] Set bytes be bc followed by
state 's current revision byte .[605] If bc is not 4/0 , 4/1 , or 4/2 :[788] Deprecated .[695] Set state 's G0 designated to
state 's 94n final set [ bytes ].[637] Set state 's G0 RL designated to
state 's 94n final RL set [ bytes ].[1983] If state 's LS0 by G0 designation flag is true :[1984] Set state 's GL invoked to G0 .[1286] Set state 's decoder state to default state .3/1 [902] Set state 's G0 designated to the result of
getting a G set with
94 , 3 , marc , 3/1 .[1715] Set state 's G0 RL designated to unassigned-94 .[1985] If state 's LS0 by G0 designation flag is true :[1986] Set state 's GL invoked to G0 .[ 4/5 , 4/6 , 4/7 , 4/15 , 5/0 , 5/1 ] [1314] If state 's current revision byte is not null
:[1315] Error .[1283] Deprecated .[1284] Set state 's Gj designated to
getting a G set with
94 , 1 , jphone , bc .[1285] Set state 's GL invoked to Gj .[1287] Set state 's decoder state to default state .Otherwise [1316] If state 's current revision byte is not null
:[1317] Error .[601] Set state 's current byte sequence be 2/4 .[603] Set state 's decoder state to escape unassigned state .[604] Reconsume bc .[617] The escape multiple graphic state switches
by the bit combination bc :
[ 2/0 , 2/5 ] [632] Set state 's current I byte to bc .[633] Set state 's decoder state to escape multiple graphic I state .[ 3/0 , 7/14 ] [1306] If state 's current revision byte is null
:[1307] Set bytes be bc .[1308] Otherwise:[1309] Set bytes be bc followed by
state 's current revision byte .[634] If state 's current element is G0 :[635] If state 's current size is 94 and
bc is 4/0 , 4/1 , or 4/2 :[636] Deprecated .[696] If state 's current size is 94 :[698] Set state 's G0 designated to
state 's 94n final set [ bytes ].[699] Set state 's G0 RL designated to
state 's 94n final RL set [ bytes ].[1987] If state 's LS0 by G0 designation flag is true :[1988] Set state 's GL invoked to G0 .[700] Otherwise, if state 's current size is 96 :[701] Set state 's G0 designated to
state 's 96n final set [ bytes ].[702] Set state 's G0 RL designated to unassigned-94 .[1989] If state 's LS0 by G0 designation flag is true :[1990] Set state 's GL invoked to G0 .[639] Otherwise, if state 's current element is G1 :[638] If state 's current size is 94 :[640] Set state 's G1 designated to
state 's 94n final set [ bytes ].[703] Set state 's G1 RL designated to
state 's 94n final RL set [ bytes ].[704] Otherwise, if state 's current size is 96 :[705] Set state 's G1 designated to
state 's 96n final set [ bytes ].[706] Set state 's G1 RL designated to unassigned-94 .[641] Otherwise, if state 's current element is G2 :[642] If state 's current size is 94 :[707] Set state 's G2 designated to
state 's 94n final set [ bytes ].[708] Set state 's G2 RL designated to
state 's 94n final RL set [ bytes ].[709] Otherwise, if state 's current size is 96 :[710] Set state 's G2 designated to
state 's 96n final set [ bytes ].[711] Set state 's G2 RL designated to unassigned-94 .[643] Otherwise, if state 's current element is G3 :[644] If state 's current size is 94 :[712] Set state 's G3 designated to
state 's 94n final set [ bytes ].[790] Set state 's G3 RL designated to
state 's 94n final RL set [ bytes ].[791] Otherwise, if state 's current size is 96 :[811] Set state 's G3 designated to
state 's 96n final set [ bytes ].[812] Set state 's G3 RL designated to unassigned-94 .[645] Set state 's decoder state to default state .Otherwise [245] If state 's current size is 94 :[362] Let set be unknown-94 .[363] Otherwise, if state 's current size is 96 :[322] Let set be unknown-96 .[365] If state 's current element is G0 :[366] Set state 's G0 designated to set .[952] Set state 's G0 RL designated to unassigned-94 .[1991] If state 's LS0 by G0 designation flag is true :[1992] Set state 's GL invoked to G0 .[367] Otherwise, if state 's current element is G1 :[368] Set state 's G1 designated to set .[953] Set state 's G1 RL designated to unassigned-94 .[369] Otherwise, if state 's current element is G2 :[370] Set state 's G2 designated to set .[954] Set state 's G2 RL designated to unassigned-94 .[371] Otherwise, if state 's current element is G3 :[372] Set state 's G3 designated to set .[955] Set state 's G3 RL designated to unassigned-94 .[375] Set state 's decoder state to escape trailer state .[376] Reconsume bc .[662] The escape multiple graphic I state switches
by the bit combination bc :
[ 3/0 , 7/14 ] [1318] If state 's current revision byte is null
:[1319] Set bytes be
state 's current I byte followed by
bc .[1320] Otherwise:[1321] Set bytes be
state 's current I byte followed by
bc followed by
state 's current revision byte .[663] If state 's current element is G0 :[664] If state 's current size is 94 :[813] Set state 's G0 designated to
state 's 94n final set [ bytes ].[814] Set state 's G0 RL designated to
state 's 94n final RL set [ bytes ].[1993] If state 's LS0 by G0 designation flag is true :[1994] Set state 's GL invoked to G0 .[815] Otherwise, if state 's current size is 96 :[816] Set state 's G0 designated to
state 's 96n final set [ bytes ].[820] Set state 's G0 RL designated to unassigned-94 .[1995] If state 's LS0 by G0 designation flag is true :[1996] Set state 's GL invoked to G0 .[665] Otherwise, if state 's current element is G1 :[666] If state 's current size is 94 :[817] Set state 's G1 designated to
state 's 94n final set [ bytes ].[821] Set state 's G1 RL designated to
state 's 94n final RL set [ bytes ].[822] Otherwise, if state 's current size is 96 :[823] Set state 's G1 designated to
state 's 96n final set [ bytes ].[824] Set state 's G1 RL designated to unassigned-94 .[667] Otherwise, if state 's current element is G2 :[668] If state 's current size is 94 :[818] Set state 's G2 designated to
state 's 94n final set [ bytes ].[825] Set state 's G2 RL designated to
state 's 94n final RL set [ bytes ].[826] Otherwise, if state 's current size is 96 :[938] Set state 's G2 designated to
state 's 96n final set [ bytes ].[943] Set state 's G2 RL designated to unassigned-94 .[669] Otherwise, if state 's current element is G3 :[670] If state 's current size is 94 :[819] Set state 's G3 designated to
state 's 94n final set [ bytes ].[944] Set state 's G3 RL designated to
state 's 94n final RL set [ bytes ].[945] Otherwise, if state 's current size is 96 :[946] Set state 's G3 designated to
state 's 96n final set [ bytes ].[947] Set state 's G3 RL designated to unassigned-94 .[671] Set state 's decoder state to default state .Otherwise [377] If state 's current size is 94 :[378] Let set be unknown-94 .[379] Otherwise, if state 's current size is 96 :[391] Let set be unknown-96 .[393] If state 's current element is G0 :[406] Set state 's G0 designated to set .[948] Set state 's G0 RL designated to unassigned-94 .[1997] If state 's LS0 by G0 designation flag is true :[1998] Set state 's GL invoked to G0 .[409] Otherwise, if state 's current element is G1 :[420] Set state 's G1 designated to set .[949] Set state 's G1 RL designated to unassigned-94 .[425] Otherwise, if state 's current element is G2 :[435] Set state 's G2 designated to set .[950] Set state 's G2 RL designated to unassigned-94 .[439] Otherwise, if state 's current element is G3 :[445] Set state 's G3 designated to set .[951] Set state 's G3 RL designated to unassigned-94 .[460] Set state 's decoder state to escape trailer state .[463] Reconsume bc .[1000] The escape coding system state switches by
the bit combination bc :
2/0 [1004] Set state 's decoder state to escape coding system 0 state .2/1 [1005] Set state 's decoder state to escape coding system moe state .2/15 [1006] Set state 's decoder state to escape coding system wo state .3/0 [2142] If state 's lib flag is true :[2158] Set state 's input getter to the 8-bit input getter .[2143] Set state 's right mode to sjis .[2144] Set state 's S1 designated to the result of
getting a G set with
94 , 2 , 942 , 4/2 followed by 4/0 .[2145] Set state 's S2 designated to the result of
getting a G set with
94 , 2 , sjis2 , ms .[2146] Set state 's shift plane 2 mode to normal .[2147] Otherwise:[1121] Emit
character (protocol , 4/0 ).[1691] Modify character sets
of state for
« "iso2022" ».[1940] Set state 's input getter to the 8-bit input getter .[1040] Set state 's GL mode to iso2022 .[1035] Set state 's right mode to iso2022 .[1507] Set state 's decoder state to default state .3/1 [2162] Set state 's input getter to the 8-bit input getter .[2163] Set state 's right mode to uhc .[2164] Set state 's decoder state to the default state .3/2 [2165] Set state 's input getter to the 8-bit input getter .[2166] Set state 's right mode to gb18030 .[2167] Set state 's decoder state to the default state .3/3 [2171] Set state 's input getter to the 8-bit input getter .[2173] Set state 's right mode to single .[2172] Set state 's decoder state to default state .3/4 [2154] If state 's lib flag is true :[2158] Set state 's input getter to the 8-bit input getter .[2156] Set state 's right mode to big5 .[2157] Set state 's decoder state to the default state .[2155] Otherwise:[1024] Modify character sets
of state for
« "iso2022", "videotex" ».[1939] Set state 's input getter to the 8-bit input getter .[1907] Set state 's GL mode to iso2022 .[1908] Set state 's right mode to iso2022 .[1118] Run a macro with
state ,
"ESC 2/1 4/11 ESC 2/2 4/6 ESC 2/8 4/2 ESC 2/9 5/7 ESC 2/10 7/12 ESC 2/15 5/7 LS0 LS1R".[1703] Set state 's decoder state to default state .3/5 [2159] Set state 's input getter to the 8-bit input getter .[2160] Set state 's right mode to big5 .[2161] Set state 's decoder state to the default state .3/6 [2168] Set state 's input getter to the 8-bit input getter .[2169] Set state 's right mode to hangultalk .[2170] Set state 's decoder state to the default state .3/8 [1119] Emit
character (protocol , bc ).[1938] Set state 's input getter to the 8-bit input getter .[1037] If state 's UTF-8 GL flag is true :[1072] Set state 's GL mode to iso2022 .[1073] Otherwise:[1074] Set state 's GL mode to single .[1078] Set state 's left designated to the result of
getting a G set with
94 , 1 , 94 , 4/2 .[1036] Set state 's right mode to utf-8 .[1508] Set state 's decoder state to default state .3/13 [1120] Emit
character (protocol , bc ).[1509] Set state 's decoder state to default state .4/0 [2136] Emit
character (protocol , 4/0 ).[2137] Modify character sets
of state for
« "iso2022" ».[2138] Set state 's input getter to the 8-bit input getter .[2139] Set state 's GL mode to iso2022 .[2140] Set state 's right mode to iso2022 .[2141] Set state 's decoder state to default state .4/1 [2148] Modify character sets
of state for
« "iso2022", "videotex" ».[2149] Set state 's input getter to the 8-bit input getter .[2150] Set state 's GL mode to iso2022 .[2151] Set state 's right mode to iso2022 .[2152] Run a macro with
state ,
"ESC 2/1 4/11 ESC 2/2 4/6 ESC 2/8 4/2 ESC 2/9 5/7 ESC 2/10 7/12 ESC 2/15 5/7 LS0 LS1R".[2153] Set state 's decoder state to default state .4/2 [1937] Set state 's input getter to the 8-bit input getter .[1039] Set state 's GL mode to single .[1110] Set state 's left designated to the result of
getting a G set with
94 , 1 , 94 , 4/2 .[1038] Set state 's right mode to utf-1 .[1510] Set state 's decoder state to default state .4/3 [1687] Modify character sets
of state for
« "iso2022", "videotex" ».[1936] Set state 's input getter to the 8-bit input getter .[1419] Set state 's GL mode to captain .[1917] Set state 's right mode to iso2022 .[1418] Set state 's decoder state to default state .4/4 [1935] Set state 's input getter to the 8-bit input getter .[1918] Set state 's GL mode to iso2022 .[1919] Set state 's right mode to iso2022 .[1506] Set state 's decoder state to data syntax 2 state .4/5 , 4/6 , 4/8 [1688] Modify character sets
of state for
« "iso2022", "videotex" ».[1934] Set state 's input getter to the 8-bit input getter .[1690] Set state 's GL mode to iso2022 .[1920] Set state 's right mode to iso2022 .[1689] Set state 's decoder state to default state .4/7 [1933] Set state 's input getter to the 8-bit input getter .[1075] If state 's UTF-8 GL flag is true :[1076] Set state 's GL mode to iso2022 .[1077] Otherwise:[1012] Set state 's GL mode to single .[1111] Set state 's left designated to the result of
getting a G set with
94 , 1 , 94 , 4/2 .[1041] Set state 's right mode to utf-8 .[1511] Set state 's decoder state to default state .[ 5/0 , 5/15 ] [1932] Set state 's input getter to the 8-bit input getter .[975] Set state 's G1 designated to the result of
getting a G set with
96 , 1 , videotex , t100alphageometric .[1362] Set state 's decoder state to default state .Otherwise [1001] Set state 's decoder state to
escape coding system unassigned state .[1002] Reconsume bc .[1018] The escape coding system moe I state switches by
the bit combination bc :
[ 3/0 , 3/15 ] [1023] Let n be
(state 's current I byte - 0x20 ) × 16 + bc - 0x30 .[1930] Set state 's input getter to the 8-bit input getter .[1043] Set state 's GL mode to iso2022 .[1045] If n is in 1 :[1047] Set state 's right mode to single .[1048] Set state 's right designated
to the result of
getting a 128 set with
ct , koi8-r .[1170] Otherwise, if n is in 2 :[1171] Set state 's right mode to single .[1172] Set state 's right designated
to the result of
getting a 128 set with
ct , koi8-u .[1173] If n is in [ 3 , 11 ]:[1174] Set state 's right mode to single .[1175] Set state 's right designated
to the result of
getting a G set with
128 , 1 , cp , 1250 + n - 3.[1049] Otherwise, if n is 12 :[1050] Set state 's right mode to sjis .[1292] Set state 's S1 designated to the result of
getting a G set with
94 , 2 , 942 , 4/2 followed by 4/0 .[1294] Set state 's S2 designated to the result of
getting a G set with
94 , 2 , sjis2 , ms .[1297] Set state 's shift plane 2 mode to normal .[1046] Otherwise, if n is 13 :[1051] Set state 's right mode to sjis .[1295] Set state 's S1 designated to the result of
getting a G set with
94 , 2 , 942 , 4/15 .[1293] Set state 's S2 designated to the result of
getting a G set with
94 , 2 , 942 , 5/0 .[1296] Set state 's shift plane 2 mode to jisx0213 .[1052] Otherwise, if n is 14 :[1053] Set state 's right mode to big5 .[1054] Otherwise, if n is 15 :[1055] Set state 's right mode to johab .[1056] Otherwise, if n is 16 :[1057] Set state 's right mode to uhc .[1058] Otherwise, if n is 17 :[1059] Set state 's right mode to iso2022 .[1060] Set state 's G1 designated
to the result of
getting a G set with
94 , 3 , cns , 1 .[1061] Set state 's G2 designated
to the result of
getting a G set with
94 , 2 , cns , euctw2 .[1062] Otherwise, if n is 18 :[1063] Set state 's right mode to iso2022 .[1064] Set state 's G1 designated to
to the result of
getting a G set with
94 , 2 , 942 , 4/15 .[1065] Set state 's G2 designated to
to the result of
getting a G set with
94 , 1 , 94 , 4/9 .[1066] Set state 's G3 designated to
to the result of
getting a G set with
94 , 2 , jis , jisx0212jisx0213 .[1067] Otherwise, if n is 19 or 20 :[1068] Set state 's right mode to gb18030 .[1042] Otherwise:[1044] Set state 's right mode to x-moe-internal .[1071] Set state 's decoder state to default state .Otherwise [1019] Set state 's decoder state to
escape coding system unassigned state .[1010] Reconsume bc .[1087] The foreign right state switches by the bit combination bc :
[ 7/15 , 15/15 ] [1090] If state 's right mode is single :[1091] Let set be state 's right designated .[1092] Emit a character
set [ bc & 0b01111111 ].[1117] Control characters are not interpreted.
[1094] Set state 's decoder state to default state .[1097] Otherwise, if state 's right mode is iso2022jp :[1335] If state 's current I byte is
in [ 10/1 , 14/15 ], 15/13 , 15/14 :[1336] Let set be state 's 94 final set [ 4/9 ].[1337] Emit a character
set [ bc & 0b01111111 ].[1341] Set state 's decoder state to default state .[1340] Otherwise:[1324] Set state 's current I byte to bc .[1325] Set state 's decoder state to foreign right first state .[1093] Otherwise, if state 's right mode is utf-1 :
[1104] Otherwise, if state 's right mode is utf-8 :[1096] Otherwise, if state 's right mode is sjis :[1342] If state 's current I byte is
in [ 10/1 , 13/15 ]:[1343] Let set be state 's 94 final set [ 4/9 ].[1344] Emit a character
set [ bc & 0b01111111 ].[1345] Set state 's decoder state to default state .[1346] Otherwise:
[1098] Otherwise, if state 's right mode is big5 :
[1099] Otherwise, if state 's right mode is uhc :
[2135] Otherwise, if state 's right mode is hangultalk :
[1100] Otherwise, if state 's right mode is johab :
[1102] Otherwise, if state 's right mode is gb18030 :[1103] Otherwise, if state 's right mode is x-moe-internal :
Otherwise [1088] Set state 's decoder state to default state .[1089] Reconsume bc .[1326] The foreign right first state switches by
the bit combination bc :
[ 0/0 , 15/15 ] [1327] If state 's right mode is iso2022jp :[1322] If state 's current I byte is in [ 7/15 , 9/8 ] and
bc is in [ 2/1 , 7/14 ]:[1323] Let first be state 's current I byte - 0x7F .[1332] Let bytes be first followed by bc .[1334] Let set be state 's S2 designated .[1333] Emit a character set [ bytes ].[1347] Set state 's decoder state to default state .[1348] Otherwise, if state 's current I byte is
in [ 15/0 , 15/12 ] and
bc is [1352] Otherwise:[1338] If state 's current I byte is in [ 7/15 , 9/15 ]:[1353] Emit a code point whose value is
state 's current I byte .[1354] Otherwise:[1355] Emit
character (unknown-byte , null
, state 's current I byte ).[1357] Set state 's decoder state to default state .[1356] Reconsume bc .[1329] Otherwise:
Otherwise [1328] Emit
character (unknown-byte , null
, state 's current I byte ).[1330] Set state 's decoder state to default state .[1331] Reconsume bc .[1156] The extended segment data state switches by
the bit combination bc :
0/0 , 0/1 , [ 0/3 , 15/15 ][1158] Set state 's current segment data to
state 's current segment data followed by bc .[1159] Set state 's current segment length to
state 's current segment length - 1 .[1160] If state 's current segment length is 0 :[92] Emit
character (ct , extended-segment-f , state 's current I byte ).[93] For each bc in
the bit combinations in
state 's current segment data , in order:[95] Emit
character (ct , extended-segment-data , bc ).[1161] Set state 's decoder state to default state .0/2 [1217] Let set be the result of
getting a CT character set
with
state 's current I byte and
state 's current segment data .[1212] Set state 's current segment data to
state 's current segment data followed by bc .[1213] Set state 's current segment length to
state 's current segment length - 1 .[1218] If set is not null
:[1224] Set state 's current CT set to set .[1228] Set state 's current segment data to the empty byte sequence .[1225] Set state 's decoder state to extended segment text state .[1219] If state 's current segment length is 0 :[1220] Set state 's decoder state to default state .[1221] Otherwise:[773] Emit
character (ct , extended-segment-f , state 's current I byte ).[774] For each bc in
the bit combinations in
state 's current segment data , in order:[1157] Emit
character (ct , extended-segment-data , bc ).[1164] Emit
character (ct , extended-segment-data , bc ).[1214] If state 's current segment length is 0 :[1216] Set state 's decoder state to default state .[1215] Otherwise:[1572] Set state 's current CT set to the result of
getting a 256 set with
ct , extended-segment-data .[1505] Set state 's decoder state to extended segment text state .Otherwise [98] Emit
character (ct , extended-segment-f , state 's current I byte ).[731] For each bc in
the bit combinations in
state 's current segment data , in order:[733] Emit
character (ct , extended-segment-data , bc ).[734] Error .[1162] Set state 's decoder state to default state .[1163] Reconsume bc .[1222] The extended segment text state switches by
the bit combination bc :
[ 0/0 , 15/15 ] [1223] Let set be state 's current CT set .[1226] Set state 's current segment data to
state 's current segment data followed by bc .[1227] Set state 's current segment length to
state 's current segment length - 1 .[1229] If set is a 94 set , 96 set , or 128 set :[1242] Let bytes be bc & 0b01111111 .[1230] If set [ bytes ] exists :[1232] Let char be set [ bytes ].[1233] Otherwise:[1234] Let char be
character (unknown-byte , null
, bc ).[1244] Emit char .[1235] Set state 's current segment data to the empty byte sequence .[1573] Otherwise, if set is a 256 set :[1581] Emit set [ bc ].[1583] Set state 's current segment data to the empty byte sequence .[1231] Otherwise, if set is a 942 set or 2562 set :[1237] If state 's current segment data 's length is 2 :[1251] If set is a 942 set :[1238] Let bytes be
state 's current segment data 's first byte & 0b01111111
followed by
state 's current segment data 's second byte & 0b01111111 .[1252] Otherwise, if set is a 2562 set :[1253] Let bytes be state 's current segment data .[1243] If set [ bytes ] exists :[1241] Let char be set [ bytes ].[1246] Emit char .[1247] Otherwise:[1248] Emit
character (unknown-byte , null
,
state 's current segment data 's first byte).[1249] Emit
character (unknown-byte , null
,
state 's current segment data 's second byte).[1245] Set state 's current segment data to the empty byte sequence .[1262] Otherwise, if state 's current I byte is 3/0 :[1264] If state 's current segment data is in [ 0/0 , 7/15 ]:[1265] Let char be a code point whose value is bc .[1267] Emit char .[1266] Set state 's current segment data to the empty byte sequence .[1236] If state 's current segment length is 0 :[1239] If state 's current segment data 's length is not 0 :[1240] Error .[1254] Set state 's decoder state to default state .Otherwise [1256] If state 's current segment data 's length is not 0 :[1257] Emit
character (unknown-byte , null
,
state 's current segment data ).[1255] Error .[1259] Set state 's decoder state to default state .[1260] Reconsume bc .[2064] The CSI state switches by the bit combination bc :
0/14 , 0/15 [2065] Let set be state 's C0 designated .[2066] Set char be set [ bc ].[2067] If char is LS0
or LS1
:[2068] Process char .[2069] Otherwise:[2071] Set state 's decoder state to default state .[2072] Reconsume bc .[ 2/0 , 2/15 ], [ 10/0 , 10/15 ] [2086] Emit
charcter (param , bc ).[2088] Set state 's decoder state to CSI I state .[ 3/0 , 3/15 ], [ 11/0 , 11/15 ] [2089] Emit
charcter (param , bc ).[ 4/0 , 7/14 ], [ 12/0 , 15/14 ] [2090] Emit
charcter (param , bc ).[2091] Set state 's decoder state to default state .8/14 , 8/15 [2070] If state 's right mode is iso2022 or unicode and
state 's CR invoked is C0 :[2073] Let set be state 's C0 designated .[2074] Set char be set [ bc & 0b01111111 ].[2075] If char is LS0
or LS1
:[2076] Process char .[2077] Otherwise:[2078] Set state 's decoder state to default state .[2079] Reconsume bc .[2080] Otherwise:[2081] Set state 's decoder state to default state .[2082] Reconsume bc .Otherwise [2083] Set state 's decoder state to default state .[2084] Reconsume bc .[2092] The CSI I state switches by the bit combination bc :
0/14 , 0/15 [2093] Let set be state 's C0 designated .[2094] Set char be set [ bc ].[2095] If char is LS0
or LS1
:[2096] Process char .[2097] Otherwise:[2098] Set state 's decoder state to default state .[2099] Reconsume bc .[ 2/0 , 2/15 ], [ 10/0 , 10/15 ] [2100] Emit
charcter (param , bc ).[ 4/0 , 7/14 ], [ 12/0 , 15/14 ] [2101] Emit
charcter (param , bc ).[2102] Set state 's decoder state to default state .8/14 , 8/15 [2103] If state 's right mode is iso2022 or unicode and
state 's CR invoked is C0 :[2104] Let set be state 's C0 designated .[2105] Set char be set [ bc & 0b01111111 ].[2106] If char is LS0
or LS1
:[2107] Process char .[2108] Otherwise:[2109] Set state 's decoder state to default state .[2110] Reconsume bc .[2111] Otherwise:[2112] Set state 's decoder state to default state .[2113] Reconsume bc .Otherwise [2114] Set state 's decoder state to default state .[2115] Reconsume bc .[213] The US state switches by the bit combination bc :
2/0 , 2/1 [1403] Emit
character (videotex , us , bc ).[1580] Set state 's GL mode to iso2022 .[1404] Set state 's decoder state to US terminal state .[ 2/2 , 2/14 ], 3/0 , 3/11 , 3/12 , 3/13 [655] If state 's current I byte is 4/10 :[1550] Set state 's GL mode to single .[1552] Set state 's left designated to the result of
getting a G set with
96 , 1 , videotex , 1/15 followed by bc .[1567] Set state 's C1 override designated to null
.[1553] Set state 's decoder state to default state .[656] Otherwise:[657] Emit
character (C0 , state 's current I byte , 1/15 ).[1401] Set state 's decoder state to default state .[658] Reconsume bc .2/15 [672] If state 's current I byte is 4/10 :[1660] Set state 's GL mode to iso2022 .[1640] Set state 's decoder state to US reset state .[673] Otherwise:[675] Emit
character (C0 , state 's current I byte , 1/15 ).[1400] Set state 's decoder state to default state .[676] Reconsume bc .3/1 , 3/2 [683] If state 's current I byte is 4/10 :[1541] Set state 's GL mode to single .[1542] Set state 's left designated to the result of
getting a G set with
96 , 1 , videotex , 1/15 followed by bc .[1565] Set state 's C1 override designated to the result of
getting a C set with
C1 , videotex , geometric-c1 .[1544] Set state 's decoder state to default state .[684] Otherwise:[997] Emit
character (C0 , state 's current I byte , 1/15 ).[1399] Set state 's decoder state to default state .[998] Reconsume bc .3/4 , 3/5 [1376] If state 's current I byte is 4/10 :[1545] Set state 's GL mode to single .[1546] Set state 's left designated to the result of
getting a G set with
96 , 1 , videotex , 1/15 followed by bc .[1547] Set state 's decoder state to default state .[1377] Otherwise:[1378] Emit
character (C0 , state 's current I byte , 1/15 ).[1398] Set state 's decoder state to default state .[1379] Reconsume bc .3/14 [1380] If state 's current I byte is 4/10 :[1579] Set state 's GL mode to telesoftware .[1575] Set state 's decoder state to default state .[1381] Otherwise:[1382] Emit
character (C0 , state 's current I byte , 1/15 ).[1397] Set state 's decoder state to default state .[1383] Reconsume bc .3/15 [1384] If state 's current I byte is 4/10 :[1628] Set state 's GL mode to iso2022 .[1617] Set state 's decoder state to TRANSPARENT state .[1385] Otherwise:[1386] Emit
character (C0 , state 's current I byte , 1/15 ).[1396] Set state 's decoder state to default state .[1387] Reconsume bc .[ 4/0 , 7/15 ] [1388] If state 's current I byte is 4/10 :[1548] Emit
character (videotex , protocol , 1/15 followed by bc ).[1549] Set state 's GL mode to iso2022 .[1568] Set state 's C1 override designated to null
.[1551] Set state 's decoder state to default state .[1389] Otherwise:[1390] Emit
character (C0 , state 's current I byte , 1/15 ).[1395] Set state 's decoder state to default state .[1391] Reconsume bc .Otherwise [1392] If state 's current I byte is 4/10 :[1393] Error .[1566] Set state 's GL mode to iso2022 .[1569] Set state 's C1 override designated to null
.[654] Otherwise:[1394] Emit
character (C0 , state 's current I byte , 1/15 ).[215] Set state 's decoder state to default state .[273] Reconsume bc .[1641] The US reset state switches by the bit combination bc :
4/0 , 4/5 [1655] Set state 's current I byte to bc .[1656] Set state 's decoder state to US reset row state .[ 4/1 , 4/4 ] [1643] If bc is 4/1 or 4/3 :[1644] Let mode be serial .[1645] Otherwise, if bc is 4/2 or 4/4 :[1646] Let mode] be parallel . [1642] Run the steps to initialize data syntax 2
with state and mode .[1647] If bc is 4/1 or 4/2 :[1648] Emit
character (videotex , reset , bc ).4/15 [1671] If state 's previous state is not null
:[1672] Set state 's G0 designated to
state 's previous state 's G0 designated .[1673] Set state 's G2 designated to
state 's previous state 's G2 designated .[1674] Set state 's GL invoked to
state 's previous state 's GL invoked .[1675] Set state 's GR invoked to
state 's previous state 's GR invoked .[1677] Set state 's C1 designated to
state 's previous state 's C1 designated .[1678] If state 's C1 designated is equal to the result of
getting a C set with
C1 , C1 , 4/0 :[1676] Run a macro with
state ,
"ESC 2/2 4/0".[1679] Otherwise, if state 's C1 designated is equal to the result of
getting a C set with
C1 , C1 , 4/1 .[1680] Emit
character] (videotex , reset , bc ). Otherwise [1657] Error .[1658] Set state 's decoder state to default state .[1659] Reconsume bc .[1661] The US reset row state switches by the bit combination bc :
[ 4/0 , 7/15 ] [1649] Set state 's previous state to a copy of decode .[1650] Set state 's G0 designated to the result of
getting a G set with
94 , 1 , 94 , 4/0 .[1652] Set state 's G2 designated to the result of
getting a G set with
94 , 1 , 94 , 6/2 .[1653] Set state 's GL invoked to G0 .[1654] Set state 's GR invoked to G2 .[1662] If state 's current I byte is 4/0 :[1664] Run a macro with
state ,
"ESC 2/2 4/0".[1663] Otherwise, if state 's current I byte is 4/5 :[1665] Run a macro with
state ,
"ESC 2/2 4/1".[1668] Emit
character (videotex , resetrow , bc ).[1666] Set state 's decoder state to default state .Otherwise [1667] Error .[1669] Set state 's decoder state to default state .[1670] Reconsume bc .[17]
A character set is an ordered map ,
where keys are byte sequences and
values are a character .
[1730]
A character set identifier is a pair of two values t1 and t2 .
It is an opaque identifier and uniquely identifies a character set within
this document.
A character set identifier is valid as t1 and t2 arguments
for exactly one of
the steps to
get a C set ,
get a G set ,
get a 128 set ,
get a 256 set , or
get a 2562 set .
[574]
A character set set has 1-byte range range if
any key in set is a bit combination in range and
set 's size is equal to
range 's end - range 's start + 1.
[576]
A character set set has 2-byte range range if
any key in set is a bit combination in range
followed by a bit combination in range and
set 's size is equal to
(range 's end - range 's start + 1)2 .
[577]
A character set set has 3-byte range range if
any key in set is a bit combination in range
followed by a bit combination in range
followed by a bit combination in range and
set 's size is equal to
(range 's end - range 's start + 1)3 .
[171]
To get a 1-byte set with
byte start ,
byte end ,
t1 ,
and
t2 ,
run these steps:
[172] Let set be a new character set .[173] For each c in [ start , end ]:[174] Let set [ c ] be
a character (t1 , t2 , c ).[175] Return set .[583]
To get a 2-byte set with
byte start ,
byte end ,
t1 ,
and
t2 ,
run these steps:
[584] Let set be a new character set .[585] For each c1 in [ start , end ]:[586] For each c2 in [ start , end ]:[589] Let cc be c1 followed by c2 .[587] Let set [ cc ] be
a character (t1 , t2 , cc ).[588] Return set .[590]
To get a 3-byte set with
byte start ,
byte end ,
t1 ,
and
t2 ,
run these steps:
[591] Let set be a new character set .[592] For each c1 in [ start , end ]:[593] For each c2 in [ start , end ]:[594] For each c3 in [ start , end ]:[595] Let cc be c1 followed by c2 followed by c3 .[596] Let set [ cc ] be
a character (t1 , t2 , cc ).[597] Return set .[22]
A C0 set is a character set that
has 1-byte range [ 0/0 , 1/15 ].
[23]
A C1 set is a character set that
has 1-byte range [ 8/0 , 9/15 ].
[176]
To get a C set with
type , t1 , and t2 ,
run these steps:
[652] If type is C0 :[177] Let set be the result of
getting a 1-byte set
with 0/0 , 1/15 , t1 , t2 .[653] Otherwise, if type is C1 :[181] Let set be the result of
getting a 1-byte set
with 8/0 , 9/15 , t1 , t2 .[180] If t1 is C0 and t2 is not 7/14 :[178] Set set [ 1/11 ] to ESC
.[187] If t1 is C0 and t2 is one of:
4/1 (ISO-IR 1),
4/3 (ISO-IR 26),
4/4 (ISO-IR 36),
4/6 (ISO-IR 74),
4/11 (ISO-IR 135),
4/12 (ISO-IR 140),
4/5 (ISO-IR 106),
4/8 (ISO-IR 130),
or
4/10 (ISO-IR 134):[188] Set set [ 0/14 ] to LS1
.[189] Set set [ 0/15 ] to LS0
.[190] If t1 is C0 and t2 is
4/1 (ISO-IR 7),
4/3 (ISO-IR 26),
or
4/4 (ISO-IR 36):[191] Set set [ 1/12 ] to SS2
.[192] If t1 is C0 and t2 is one of:
4/5 (ISO-IR 106),
4/9 (ISO-IR 132),
4/10 (ISO-IR 134),
or
4/12 (ISO-IR 135):[193] Set set [ 1/9 ] to SS2
.[193] Set set [ 1/14 ] to SS3
.[194] If t1 is C0 and t2 is 4/12 (ISO-IR 140):[195] Set set [ 1/9 ] to SS2
.[1962] If t1 is gb8565 and t2 is C0 :[1963] Set set [ 0/14 ] to LS1
.[1964] Set set [ 0/15 ] to LS0
.[1968] Set set [ 1/11 ] to ESC
.[1965] If t1 is isiri3342 and t2 is C0 :[1966] Set set [ 0/14 ] to LS1
.[1967] Set set [ 0/15 ] to LS0
.[1969] Set set [ 1/11 ] to ESC
.[1716] If t1 is dtvcc and t2 is C0 :[1717] Set set [ 1/0 ] to EXT1
.[196] If t1 is C1 and t2 is one of:
4/5 (ISO-IR 40),
4/3 (ISO-IR 77),
4/3 followed by 4/0 ,
or
4/7 (ISO-IR 105):[197] Set set [ 8/14 ] to SS2
.[198] Set set [ 8/15 ] to SS3
.[1999] If t1 is C1 and t2 is
4/3 (ISO-IR 77)
or
4/3 followed by 4/0 :[2001] Set set [ 9/0 ] to DCS
.[2002] Set set [ 9/13 ] to OSC
.[2003] Set set [ 9/14 ] to PM
.[2004] Set set [ 9/15 ] to APC
.[2007] If t2 is 4/3 followed by 4/0 :[2005] Set set [ 9/8 ] to SOS
.[2015] Set set [ 9/10 ] to SCI
.[2006] Set set [ 9/12 ] to ST
.[2016] If t1 is C1 and
t2 is one of:
4/0 (ISO-IR 56),
4/1 (ISO-IR 73),
4/3 (ISO-IR 77),
4/3 followed by 4/0 ,
or
4/8 (ISO-IR 107):[2025] Set set [ 9/11 ] to CSI
.[1138] If t1 is C1 and t2 is 4/4 :[1165] Set set [ 9/5 ] to P-MACRO
.[1971] If t1 is gb8565 and t2 is C1 :[1970] Set set [ 8/14 ] to SS2
.[1972] Set set [ 8/15 ] to SS3
.[2026] Set set [ 9/11 ] to CSI
.[2008] Set set [ 9/14 ] to PM
.[25] If t1 is vt and t2 is C1 :[688] Set set [ 8/14 ] to LS1
.[689] Set set [ 8/15 ] to LS0
.[715] Set set [ 9/0 ] to DCS
.[2027] Set set [ 9/11 ] to CSI
.[1554] If t1 is videotex and t2 is geometric-c1 :[1555] Set set [ 9/8 ] to SOS
.[1556] Set set [ 9/12 ] to ST
.[1016] If t1 is marc and t2 is C1 :[1017] Set set [ 8/8 ] to SOS
.[1020] Set set [ 8/9 ] to ST
.[1557] If t1 is C1 and t2 is one of:
4/3 (ISO-IR 77)
or
4/3 followed by 4/0 :[1558] Set set [ 9/12 ] to ST
.[716] Return set .[179] The following combinations of
type , t1 , and t2 are used:
(C0 , C0 , bytes ) where bytes is a byte sequence (C0 , gb8565 , C0 ) (C0 , unknown-control , null
) (C0 , dtvcc , C0 ) (C0 , isiri3342 , CR ) (C1 , C1 , bytes ) where bytes is a byte sequence (C0 , gb8565 , C1 ) (C1 , vt , C1 ) (C1 , videotex , 2/0 ) (C1 , videotex , 2/1 ) (C1 , videotex , sound-control ) (C1 , videotex , geometric-c1 ) (C1 , marc , C1 ) (C1 , unknown-control , null
) (C1 , dtvcc , C1 ) (C0 , dtvcc , C2 ) (C1 , dtvcc , C3 ) [19]
The initial C0 set is the result of
getting a C set with C0 , C0 , 4/7 .
[37]
The unknown C0 set is the result of
getting a C set with C0 , unknown-control , null
.
[24]
The empty C1 set is the result of
getting a C set with C1 , C1 , 7/14 .
[661]
The unknown C1 set is the result of
getting a C set with C1 , unknown-control , null
.
[45]
A G set is
94 set , 96 set ,
942 set , 962 set ,
or
943 set .
[578]
A 94 set is a character set
that has 1-byte range [ 2/1 , 7/14 ].
[579]
A 96 set is a character set
that has 1-byte range [ 2/0 , 7/15 ].
[580]
A 942 set is a character set
that has 2-byte range [ 2/1 , 7/14 ].
[581]
A 962 set is a character set
that has 2-byte range [ 2/0 , 7/15 ].
[582]
A 943 set is a character set
that has 3-byte range [ 2/1 , 7/14 ].
[374]
To determine whether is 96 size set , run these steps:
[569] If set is unknown-96 , return true .[570] Otherwise, if set is a 96 set , return true .[373] Otherwise, if set is a 962 set , return true .[571] Otherwise, return false .[348]
To determine character set set 's byte length ,
run these steps:
[350] If set is a 94 set or 96 set :[351] Return 1 .[352] Otherwise, if set is a 942 set or 962 set :[353] Return 2 .[360] Otherwise, if set is a 943 set :[361] Return 3 .[854] To get a G set with
size ,
length ,
t1 ,
and
t2 ,
run these steps:
[855] If size is 94 and length is 1 :[856] Let set be the result of getting a 1-byte set
with 2/1 , 7/14 , t1 , t2 .[697] Otherwise, if size is 96 and length is 1 :[857] Let set be the result of getting a 1-byte set
with 2/0 , 7/15 , t1 , t2 .[858] Otherwise, if size is 94 and length is 2 :[859] Let set be the result of getting a 2-byte set
with 2/1 , 7/14 , t1 , t2 .[860] Otherwise, if size is 96 and length is 2 :[861] Let set be the result of getting a 2-byte set
with 2/0 , 7/15 , t1 , t2 .[862] Otherwise, if size is 94 and length is 3 :[863] Let set be the result of getting a 3-byte set
with 2/1 , 7/14 , t1 , t2 .[864] Return set .[827] The following combinations of
size , length , t1 , and t2 are used:
(size , 1 , bytes ) where
size is 94 or 96 and bytes is a byte sequence (94 , 1 , isiri2900 , GL ) (94 , 1 , isiri3342 , G1 ) (94 , 1 , isiri3342 , G2 ) (94 , 1 , tis620 , GR ) (94 , 1 , marc , 6/2 ) (94 , 1 , marc , 6/7 ) (94 , 1 , marc , 7/0 ) (94 , 1 , marc , 7/3 ) (94 , 1 , vt , 8/6 ) (94 , 1 , vt52 , 8/6 ) (94 , 1 , vt , 8/7 ) (94 , 1 , vt , F ) where F is in [ 3/0 , 3/14 ] (94 , 1 , vt , 4/11 ) (94 , 1 , vt , 5/5 ) (94 , 1 , vt , 2/2 followed by 3/1 ) (94 , 1 , vt , 2/2 followed by 3/4 ) (94 , 1 , vt , 2/5 followed by F ) where
F is in [ 3/0 , 3/15 ] (94 , 1 , vt-left , bytes )
where bytes is a byte sequence (94 , 1 , vt-right , bytes )
where bytes is a byte sequence (94 , 1 , marc , F ) where F is in [ 3/2 , 3/4 ] (94 , 1 , arib , F ) where F is in [ 3/0 , 3/8 ] (94 , 1 , mule-94 , F ) where F is a bit combination (94 , 1 , jphone , F ) where F is in [ 4/3 , 5/1 ] (94 , 1 , ksx1001], hangul ) (96 , 1 , videotex , t100alphageometric ) (96 , 1 , videotex , bytes )
where bytes is a byte sequence (96 , 1 , videotex , l ) (96 , 1 , mule-96 , F ) where F is a bit combination (96 , 1 , dtvcc , G0 ) (96 , 1 , dtvcc , G1 ) (96 , 1 , dtvcc , G2 ) (96 , 1 , dtvcc , G3 ) (94 , 2 , 942 , bytes )
where bytes is a byte sequence (94 , 2 , jisx0208 , ms ) (94 , 2 , jisx0208 , opennec ) (94 , 2 , dec , udc1978 ) (94 , 2 , jef , null
) (94 , 2 , jisx0212 , openibm ) (94 , 2 , jis , jisx0212jisx0213 ) (94 , 2 , sjis2 , ms ) (94 , 2 , sjis2 , docomo ) (94 , 2 , mule-942 , F ) where
F is a bit combination (94 , 2 , arib , F ) where F is in [ 3/9 , 3/11 ] (94 , 2 , cns , p ) where p is in [ 1 , 80 ] (94 , 2 , cns , old14 ) (94 , 2 , ksx1001 , 1998 ) (94 , 2 , ksx1001 , 2002 ) (94 , 2 , ksx1002 , 1 ) (94 , 2 , ksx1002 , 2 ) (96 , 2 , mule-962 , F ) where
F is a bit combination (96 , 2 , mule2.3 , F ) where
F is a bit combination (96 , 2 , mule-962 , cgreek ) (96 , 2 , videotex , sound-tone ) (94 , 3 , 943 , bytes )
where bytes is a byte sequence (94 , 3 , cns , euctw2 ) (94 , 3 , marc , 3/1 ) (94 , 3 , mule-943 , F ) where
F is a bit combination [1095]
A 128 set is a character set
that has 1-byte range [ 0/0 , 7/15 ].
[1183]
A 256 set is a character set
that has 1-byte range [ 0/0 , 15/15 ].
[1176]
A 2562 set is a character set
that has 2-byte range [ 0/0 , 15/15 ].
[1184]
To get a 128 set
with t1 and t2 ,
run these steps:
[1113] Let set be the result of getting a 1-byte set
with 0/0 , 7/15 , t1 , t2 .[1115] If t1 is single and t2 is barcode :[1116] Set set [ 1/11 ] to ESC
.[1114] Return set .[1186] The following combinations of
t1 and t2 are used:
[1268]
To get a 256 set
with t1 and t2 ,
run these steps:
[1269] Let set be the result of getting a 1-byte set
with 0/0 , 15/15 , t1 , t2 .[1270] Return set .[1271] The following combinations of
t1 and t2 are used:
(unknown-byte , null
) (vts , transparent ) (captain , bc ) where bc is a bit combination (videotex , transparent ) (ct , extended-segment-data ) [1185]
To get a 2562 set
with t1 and t2 ,
run these steps:
[1182] Let set be the result of getting a 2-byte set
with 0/0 , 15/15 , t1 , t2 .[1181] Return set .[1187] The following combinations of
t1 and t2 are used:
(sjis , null
) (sjis , 2000 ) (gbk , null
) (big5 , null
) (big5 , hp ) (big5 , hkscs ) (uhc , null
) (johab , null
) (unicode , 1.1 ) (unicode , non-unicode ) (unicode , non-10646 ) [1167] A CT right encoding name is one of the followings:
[1168] A CT 2-byte encoding name is one of the followings:
[1177]
To get a CT character set with F and encoding name ,
run these steps:
[1178] If F is 3/1 and encoding name is
a CT right encoding name :[1188] If encoding name is iso8859-14
:[1189] Return the result of
getting a G set with
96 , 1 , 96 , 5/15 .[1190] Otherwise, if encoding name is iso8859-15
:[1191] Return the result of
getting a G set with
96 , 1 , 96 , 6/2 .[1194] Otherwise, if encoding name is mulelao-1
:[1195] Return the result of
getting a G set with
94 , 1 , mule-94 , 3/1 .[1196] Otherwise, if encoding name is iscii-dev
:[1197] Return the result of
getting a G set with
94 , 1 , mule-94 , 3/5 .[1199] Otherwise, if encoding name is
omron_UDC_zh
or omron_UDC_tw
:[1200] Return the result of
getting a G set with
94 , 1 , mule-94 , 3/0 .[1192] Otherwise:[1193] Return the result of
getting a 128 set with
ct , enoding name .[1179] Otherwise, if F is 3/2 and encoding name is
a CT 2-byte encoding name :[1198] If encoding name is fujitsu.u90x03
:[1201] Return the result of
getting a G set with
94 , 2 , jef , null
.[1202] Otherwise, if encoding name is DEC.CNS11643.1986-2
:[1203] Return the result of
getting a G set with
94 , 2 , cns , 2 .[1204] Otherwise, if encoding name is DEC.DTSCS.1990-2
:[1205] Return the result of
getting a G set with
94 , 2 , cns , old14 .[1206] Otherwise, if encoding name is big5-0
or BIG5-0
:[1207] Return the result of
getting a 2562 set with
big5 , null
.[1208] Otherwise, if encoding name is big5hkscs-0
:[1209] Return the result of
getting a 2562 set with
big5 , hkscs .[1210] Otherwise, if encoding name is gbk-0
:[1211] Return the result of
getting a 2562 set with
gbk , null
.[1261] If F is 3/0 and encoding name is HP-BIG5
:[1263] Return the result of
getting a 2562 set with
big5 , hp .[1169] Otherwise:[1180] Return null
.[333]
To modify character sets of state state for
list features , run these steps:
[342] For each feature in features :[739] Switch by feature :"fixed" [54] Set state 's escape set [ 6/13 ] to
character (deprecated , LS3R
).[55] Set state 's escape set [ 6/14 ] to LS2
.[56] Set state 's escape set [ 6/15 ] to LS3
.[57] Set state 's escape set [ 7/12 ] to LS3R
.[60] Set state 's escape set [ 7/13 ] to LS2R
.[118] Set state 's escape set [ 7/14 ] to LS1R
.[49] Set state 's escape set [ 6/7 ] to
character (marc , esc , 6/7 ).[62] Set state 's escape set [ 7/3 ] to
character (marc , esc , 7/3 ).[123] Set state 's escape set [ 7/11 ] to
character (vt , esc , 7/11 ).[775] Set state 's escape set [ 3/5 ] to
character (vt , esc , 3/5 ).[776] Set state 's escape set [ 3/6 ] to
character (vt , esc , 3/6 ).[777] Set state 's escape set [ 3/7 ] to
character (vt , esc , 3/7 ).[686] Set state 's escape set [ 3/12 ] to
character (vt , esc , 3/12 ).[760] Set state 's escape set [ 3/13 ] to
character (vt , esc , 3/13 ).[761] Set state 's escape set [ 3/14 ] to
character (vt , esc , 3/14 ).[782] Set state 's escape set [ 3/15 ] to
character (vt , esc , 3/15 ).[764] Set state 's escape set [ 3/10 ] to
character (tektronix , esc , 3/10 ).[765] Set state 's escape set [ 3/11 ] to
character (tektronix , esc , 3/11 ).[766] Set state 's escape set [ 3/0 ] to
character (mule , esc , 3/0 ).[840] For each bc in [ 3/0 , 7/14 ]:[842] Set bytes be bc .[841] Set state 's 94 final set [ bytes ] to the result of
getting a G set with
94 , 1 , null
, bc .[846] Set state 's 96 final set [ bytes ] to the result of
getting a G set with
96 , 1 , null
, bc .[878] Set state 's 94n final set [ bytes ]
to unassigned-94 .[879] Set state 's 96n final set [ bytes ]
to unassigned-96 .[880] Set state 's 94n final RL set [ bytes ]
to unassigned-94 .[843] For each ibc in [ 2/0 , 2/5 ]:[844] Set bytes be ibc followed by bc .[845] Set state 's 94 final set [ bytes ] to the result of
getting a G set with
94 , 1 , ibc , bc .[847] Set state 's 96 final set [ bytes ] to the result of
getting a G set with
96 , 1 , ibc , bc .[881] Set state 's 94n final set [ bytes ]
to unassigned-94 .[882] Set state 's 96n final set [ bytes ]
to unassigned-96 .[883] Set state 's 94n final RL set [ bytes ]
to unassigned-94 .[274] For each bc in [ 4/0 , 5/15 ]:[865] Set bytes be bc .[866] Set state 's 94n final set [ bytes ]
to the result of
getting a G set with
94 , 2 , null
, bc .[848] Set state 's 96n final set [ bytes ]
to the result of
getting a G set with
96 , 2 , null
, bc .[849] Set state 's 94n final RL set [ bytes ]
to unassigned-94 .[850] For each ibc in [ 2/0 , 2/5 ]:[867] Set bytes be ibc followed by bc .[868] Set state 's 94n final set [ bytes ]
to the result of
getting a G set with
94 , 2 , null
, bc .[851] Set state 's 96n final set [ bytes ]
to the result of
getting a G set with
96 , 2 , null
, bc .[852] Set state 's 94n final RL set [ bytes ]
to unassigned-94 .[853] For each bc in [ 6/0 , 6/15 ]:[869] Set bytes be bc .[870] Set state 's 94n final set [ bytes ]
to the result of
getting a G set with
94 , 3 , null
, bc .[871] Set state 's 96n final set [ bytes ]
to unassigned-96 .[872] Set state 's 94n final RL set [ bytes ]
to unassigned-94 .[873] For each ibc in [ 2/0 , 2/5 ]:[874] Set bytes be ibc followed by bc .[875] Set state 's 94n final set [ bytes ]
to the result of
getting a G set with
94 , 3 , null
, bc .[876] Set state 's 96n final set [ bytes ]
to unassigned-96 .[877] Set state 's 94n final RL set [ bytes ]
to unassigned-94 .[920] For each F in
3/9 ,
[ 3/12 , 3/14 ],
2/2 followed by 3/1 ,
2/2 followed by 3/4 ,
2/5 followed by 3/0 ,
2/5 followed by 3/2 ,
2/5 followed by 3/4 ,
2/5 followed by 3/5 ,
2/5 followed by 3/6 ,
2/5 followed by 3/13 , and
2/5 followed by 3/15 :[921] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , vt , F .[915] For each F in [ 3/0 , 3/2 , 3/14 ]:[916] Set state 's 96 final set [ F ] to the result of
getting a G set with
96 , 1 , mule-96 , F .[917] Set state 's 96 final set [ 3/8 ] to the result of
getting a G set with
96 , 1 , videotex , 3/8 .[918] Set state 's 96 final set [ 3/9 ] to the result of
getting a G set with
96 , 1 , videotex , 3/9 .[919] Set state 's 96 final set [ 2/2 followed by 3/15 ]
to the result of
getting a G set with
94 , 1 , vt , 3/12 .[898] For each F in [ 4/7 , 4/13 ]:[897] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , cns , F - 0x47 + 1.[888] For each F in 3/4 and [ 3/12 , 3/14 ]:[887] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , cns , F - 0x30 + 1.[886] For each I in [ 2/3 , 2/4 ]:[889] For each F in [ 3/0 , 3/15 ]:[890] Let p be
(I - 0x20 ) × 0x10 + F - 0x30 + 1 .[891] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , cns , p .[885] For each F in [ 3/0 , 3/2 ]:[884] Set state 's 96n final set [ F ]
to the result of
getting a G set with
96 , 2 , mule-962 , F .[912] Set state 's 94n final set
[ 2/2 followed by 3/0 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/0 .[913] Set state 's 94n RL final set
[ 2/2 followed by 3/0 ]
to the result of
getting a G set with
94 , 2 , dec , udc1978 .[936] For each F in 6/2 , 6/7 , and 7/0 :[935] Set state 's 94 final set [ 1/11 followed by F ]
to the result of
getting a G set with
94 , 1 , marc , F .[937] Set state 's 94 final set [ 1/11 followed by 7/3 ]
to the result of
getting a G set with
94 , 1 , 94 , 4/2 .[939] Set state 's 94 final set [ 8/7 ]
to the result of
getting a G set with
94 , 1 , 94 , 4/2 .[1763] Set state 's macro set [ bc ] to macro
by each row of the following tables:bc macro 6/0 macro "ESC 2/4 4/2 ESC 2/9 4/10 ESC 2/10 3/0 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/1 macro "ESC 2/4 4/2 ESC 2/9 3/1 ESC 2/10 3/0 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/2 macro "ESC 2/4 4/2 ESC 2/9 2/0 4/1 ESC 2/10 3/0 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/3 macro "ESC 2/8 3/2 ESC 2/9 3/4 ESC 2/10 3/5 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/4 macro "ESC 2/8 3/2 ESC 2/9 3/3 ESC 2/10 3/5 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/5 macro "ESC 2/8 3/2 ESC 2/9 2/0 4/1 ESC 2/10 3/5 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/6 macro "ESC 2/8 2/0 4/1 ESC 2/9 2/0 4/2 ESC 2/10 2/0 4/3 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/7 macro "ESC 2/8 2/0 4/4 ESC 2/9 2/0 4/5 ESC 2/10 2/0 4/6 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/8 macro "ESC 2/8 2/0 4/7 ESC 2/9 2/0 4/8 ESC 2/10 2/0 4/9 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/9 macro "ESC 2/8 2/0 4/10 ESC 2/9 2/0 4/11 ESC 2/10 2/0 4/12 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/10 macro "ESC 2/8 2/0 4/13 ESC 2/9 2/0 4/14 ESC 2/10 2/0 4/15 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/11 macro "ESC 2/4 4/2 ESC 2/9 2/0 4/2 ESC 2/10 3/0 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/12 macro "ESC 2/4 4/2 ESC 2/9 2/0 4/3 ESC 2/10 3/0 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/13 macro "ESC 2/4 4/2 ESC 2/9 2/0 4/4 ESC 2/10 3/0 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/14 macro "ESC 2/8 3/1 ESC 2/9 3/0 ESC 2/10 4/10 ESC 2/11 2/0 7/0 LS0 ESC 7/13"6/15 macro "ESC 2/8 4/10 ESC 2/9 3/2 ESC 2/10 2/0 4/1 ESC 2/11 2/0 7/0 LS0 ESC 7/13"
"fallback" [740] Set state 's fixed set [ 2/0 ] to SP
.[741] Set state 's fixed set [ 7/15 ] to DEL
.[743] Set state 's fixed set [ 10/0 ] to
character (unknown-byte , null
, 10/0 ).[1952] Set state 's fixed set [ 15/15 ] to
character (unknown-byte , null
, 15/15 ).[1731] For each bc in
6/2 , 6/3 , 6/4 , 6/11 , 6/12 , 6/15 ,
7/0 , 7/2 :[125] Set state 's escape set [ bc ] to
character (unknown-control , null
, 1/11 followed by bc ).[758] For each bc in [ 0/0 , 1/15 ]:[759] Remove state 's escape set [ bc ].[778] For each bc in [ 3/1 , 3/4 ]:[779] Set state 's escape set [ bc ] to
character (unknown-control , null
, bc ).[780] Set state 's escape set [ 3/8 ] to
character (unknown-control , null
, 3/8 ).[781] Set state 's escape set [ 3/9 ] to
character (unknown-control , null
, 3/9 ).[922] For each F in [ 3/0 , 3/8 ], 4/0 ,
4/3 , 4/5 , 4/7 , 4/8 , 4/11 , 5/1 , 5/5 ,
7/0 , 7/10 , 7/11 , 7/13 ,
2/0 followed by 7/10 , 2/0 followed by 7/11 :[923] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , 94 , F .[1701] For each F in
7/10 , 7/11 :[1702] Set state 's 96 final set [ F ] to the result of
getting a G set with
96 , 1 , 96 , F .[894] For each F in
3/0 , 3/2 , 3/3 , [ 3/5 , 3/9 ], 3/11 , 3/15 ,
4/2 , 4/3 , 4/5 , 4/6 :[896] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , 942 , F .[895] Set state 's 94n final set [ 3/1 ]
to unassigned-94 .[2128] Set state 's 94n final set [ 3/10 ]
to unassigned-94 .[908] For each F in 3/1 , 3/3 , [ 4/0 , 4/2 ]:[911] Set state 's 94n RL final set [ F ]
to unassigned-94 .[940] Set state 's 94 final set [ 8/6 ]
to the result of
getting a G set with
94 , 1 , vt , 8/6 .[1683] Set state 's 94n final set [ 4/2 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/2 .[1684] Set state 's 94n final set
[ 4/2 followed by 4/0 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/2 followed by 4/0 .[2277] For designate-IF and IRR-IF supported by ecma35lib :[2279] Set state 's 94 final set
[ designate-IF followed by IRR-IF ]
to the result of
getting a G set with
94 , 1 , 94 , designate-IF followed by IRR-IF ,
if applicable.[2280] Set state 's 96 final set
[ designate-IF followed by IRR-IF ]
to the result of
getting a G set with
96 , 1 , 96 , designate-IF followed by IRR-IF ,
if applicable.[2281] Set state 's 94n final set
[ designate-IF followed by IRR-IF ]
to the result of
getting a G set with
94 , 2 , 942 , designate-IF followed by IRR-IF ,
if applicable.[2282] Set state 's 96n final set
[ designate-IF followed by IRR-IF ]
to the result of
getting a G set with
96 , 2 , 962 , designate-IF followed by IRR-IF ,
if applicable."iso2022" [1953] Set state 's fixed set [ 2/0 ] to SP
.[1954] Set state 's fixed set [ 7/15 ] to DEL
.[1955] Set state 's fixed set [ 10/0 ] to
character (unknown-byte , null
, 10/0 ).[1956] Set state 's fixed set [ 15/15 ] to
character (unknown-byte , null
, 15/15 ).[29] Set state 's escape set [ 6/4 ] to CMD
.[42] Set state 's escape set [ 6/2 ] to
character (esc , 6/2 ).[2121] Set state 's escape set [ 6/3 ] to
character (esc , 6/3 ).[1681] For each F in
4/0 , 4/3 , 4/5 , 4/8 , 4/11 , 5/1 , 5/5 , 6/0 ,
7/0 , 7/10 , 7/11 , 7/13 ,
2/0 followed by 7/10 , 2/0 followed by 7/11 :[1682] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , 94 , F .[1699] For each F in
7/10 , 7/11 :[1700] Set state 's 96 final set [ F ] to the result of
getting a G set with
96 , 1 , 96 , F .[2116] For each bc in 4/2 , 4/3 , 4/5 , 4/6 :[1685] Set state 's 94n final set [ bc ]
to the result of
getting a G set with
94 , 2 , 942 , bc .[1686] Set state 's 94n final set
[ 4/2 followed by 4/0 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/2 followed by 4/0 ."cns" [892] For each F in
[ 3/0 , 3/3 ], [ 3/5 , 3/11 ], and 3/15 :[893] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , cns , F - 0x30 + 1.[2273] For each F in
[ 3/0 , 3/15 ]:[2274] Set state 's 94n final set
[ 2/1 followed by F ]
to the result of
getting a G set with
94 , 2 , cns , F - 0x30 + 1 + 0x10.[2275] For each F in
[ 3/0 , 3/15 ]:[2276] Set state 's 94n final set
[ 2/2 followed by F ]
to the result of
getting a G set with
94 , 2 , cns , F - 0x30 + 1 + 0x20."mongolian7" [744] Set state 's fixed set [ 2/0 ] to MSP
."mongolian8" [748] Set state 's fixed set [ 2/0 ] to SP
.[1957] Set state 's fixed set [ 10/0 ] to MSP
."jisold" [2278] Set state 's 94 final set [ 4/7 ]
to the result of
getting a G set with
94 , 1 , 94 , 4/9 .[977] Set state 's 94 final set [ 4/8 ]
to the result of
getting a G set with
94 , 1 , 94 , 4/10 ."jisms" [1358] Set state 's 94n final set [ 3/15 ]
to the result of
getting a G set with
94 , 2 , sjis2 , ms .[1359] Set state 's 94n final set [ 4/0 ]
to the result of
getting a G set with
94 , 2 , jisx0208 , ms .[1360] Set state 's 94n final set [ 4/2 ]
to the result of
getting a G set with
94 , 2 , jisx0208 , ms .[1361] Set state 's 94n final set
[ 4/2 followed by 4/0 ]
to the result of
getting a G set with
94 , 2 , jisx0208 , ms ."ks" [901] Set state 's 94n final set [ 3/1 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/3 .[2117] Set state 's 94n final set [ 4/3 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/3 .[2118] Set state 's 94n final set [ 4/5 ]
to the result of
getting a G set with
94 , 2 , ksx1002 , 1 .[2119] Set state 's 94n final set [ 4/6 ]
to the result of
getting a G set with
94 , 2 , ksx1002 , 2 .[2183] Set state 's 94 final set [ 3/2 ]
to the result of
getting a G set with
94 , 1 , 94 , 4/2 ."ks1998" [2117] Set state 's 94n final set [ 4/3 ]
to the result of
getting a G set with
94 , 2 , ksx1001 , 1998 ."ks2002" [2120] Set state 's 94n final set [ 4/3 ]
to the result of
getting a G set with
94 , 2 , ksx1001 , 2002 ."isiri3342" [1958] Set state 's fixed set [ 2/0 ] to
character (isiri3342 , left , SP ).[1959] Set state 's fixed set [ 7/15 ] to
character (isiri3342 , left , DEL ).[1960] Set state 's fixed set [ 10/0 ] to
character (isiri3342 , right , SP ).[1961] Set state 's fixed set [ 15/15 ] to
character (isiri3342 , right , DEL )."videotex" [52] Set state 's escape set [ 6/11 ] to
character (deprecated , LS1R
).[53] Set state 's escape set [ 6/12 ] to
character (deprecated , LS2R
).[43] Set state 's escape set [ 7/0 ] to PCD
.[974] Set state 's 94 final set [ 4/0 ] to the result of
getting a G set with
94 , 1 , videotex , 4/0 .[928] For each F in [ 3/0 , 3/8 ], 7/0 :[929] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , arib , F .[904] For each F in [ 3/9 , 3/11 ], 4/2 :[903] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , arib , F .[1453] Set state 's 94n final set
[ 4/2 followed by 4/0 ]
to the result of
getting a G set with
94 , 2 , arib , 4/2 .[1026] Set state 's 96 final set [ 7/10 ] to the result of
getting a G set with
96 , 1 , 96 , 2/0 followed by 7/10 .[1692] Set state 's 96 final set [ 7/11 ] to the result of
getting a G set with
96 , 1 , 96 , 2/0 followed by 7/11 .[1693] Set state 's 94 final set [ 7/10 ] to the result of
getting a G set with
96 , 1 , 96 , 2/0 followed by 7/10 .[1694] Set state 's 94 final set [ 7/11 ] to the result of
getting a G set with
96 , 1 , 96 , 2/0 followed by 7/11 .[1695] Set state 's 94 final set [ 2/0 followed by 7/10 ]
to the result of
getting a G set with
96 , 1 , 96 , 2/0 followed by 7/10 .[1696] Set state 's 94 final set [ 2/0 followed by 7/11 ]
to the result of
getting a G set with
96 , 1 , 96 , 2/0 followed by 7/11 .[1697] Set state 's 94 final set [ 5/7 ] to the result of
getting a G set with
96 , 1 , 96 , 5/7 .[1698] Set state 's 94 final set [ 7/13 ] to the result of
getting a G set with
96 , 1 , 96 , 7/13 ."marc" [44] Set state 's escape set [ 6/2 ] to
character (marc , esc , 6/2 ).[63] Set state 's escape set [ 7/0 ] to
character (marc , esc , 7/0 ).[930] For each F in [ 3/2 , 3/4 ]:[931] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , marc , F ."vt" [126] For each bc in
[ 3/1 , 3/4 ],
3/8 , 3/9 ,
6/4 , 6/11 , 6/12 :[120] Set state 's escape set [ bc ] to
character (vt , esc , bc ).[2122] Set state 's escape set [ 6/3 ] to
character (esc , 6/3 ).[924] For each F in [ 3/0 , 3/8 ]:[925] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , vt , F .[970] Set state 's 94 final set [ 4/3 ]
to the result of
getting a G set with
94 , 1 , vt , 3/5 .[971] Set state 's 94 final set [ 4/5 ]
to the result of
getting a G set with
94 , 1 , vt , 3/6 .[972] Set state 's 94 final set [ 4/8 ]
to the result of
getting a G set with
94 , 1 , vt , 3/7 .[973] Set state 's 94 final set [ 5/1 ]
to the result of
getting a G set with
94 , 1 , vt , 3/9 .[124] Set state 's 94 final set [ 4/11 ]
to the result of
getting a G set with
94 , 1 , vt , 4/11 .[976] Set state 's 94 final set [ 5/5 ]
to the result of
getting a G set with
94 , 1 , vt , 5/5 .[2182] Set state 's 94 final set [ 6/0 ]
to the result of
getting a G set with
94 , 1 , vt , 3/6 ."vt52" [122] For each bc in
6/2 , 6/3 , 6/4 , 6/11 , 6/12 , 6/15 ,
7/0 , 7/2 :[121] Set state 's escape set [ bc ] to
character (vt52 , esc , bc ).[942] Set state 's 94 final set [ 8/6 ]
to the result of
getting a G set with
94 , 1 , vt52 , 8/6 ."vt100" [941] Set state 's 94 final set [ 8/6 ]
to the result of
getting a G set with
94 , 1 , vt , 8/6 ."vt105" [783] Set state 's escape set [ 3/1 ] to
character (vt105 , esc , 3/1 ).[784] Set state 's escape set [ 3/2 ] to
character (vt105 , esc , 3/2 )."tektronix" [405] For each bc in [ 0/0 , 1/15 ]:[757] Set state 's escape set [ bc ] to
character (tektronix , esc , bc ).[762] Set state 's escape set [ 3/8 ] to
character (tektronix , esc , 3/8 ).[763] Set state 's escape set [ 3/9 ] to
character (tektronix , esc , 3/9 )."escshift" [933] Set state 's escape set [ 0/14 ] to
character (deprecated , LS1
).[934] Set state 's escape set [ 0/15 ] to
character (deprecated , LS0
)."noesccl" [205] For each bc in [ 0/0 , 1/15 ]:[228] Remove state 's escape set [ bc ]."decea" [905] Set state 's 94n final set [ 3/0 ]
to the result of
getting a G set with
94 , 2 , 942 , 3/0 .[906] Set state 's 94n final set [ 3/1 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/0 .[907] Set state 's 94n final set [ 3/3 ]
to the result of
getting a G set with
94 , 2 , 942 , 4/2 .[909] For each F in 3/1 , 3/3 , 4/1 , and 4/2 :[910] Set state 's 94n RL final set [ F ]
to the result of
getting a G set with
94 , 2 , 942 , 3/0 .[914] Set state 's 94n RL final set [ 4/0 ]
to the result of
getting a G set with
94 , 2 , dec , udc1978 ."mule" [767] Set state 's escape set [ 3/1 ] to
character (mule , esc , 3/1 ).[768] Set state 's escape set [ 3/2 ] to
character (mule , esc , 3/2 ).[769] Set state 's escape set [ 3/3 ] to
character (mule , esc , 3/3 ).[770] Set state 's escape set [ 3/4 ] to
character (mule , esc , 3/4 ).[926] For each F in [ 3/0 , 3/5 ]:[927] Set state 's 94 final set [ F ] to the result of
getting a G set with
94 , 1 , mule-94 , F .[900] For each F in
[ 3/0 , 3/3 ], [ 3/5 , 3/8 ], and 3/15 :[899] Set state 's 94n final set [ F ]
to the result of
getting a G set with
94 , 2 , mule-942 , F .[2127] Set state 's 94n final set [ 3/10 ]
to the result of
getting a G set with
94 , 3 , mule-943 , F .[2129] Set state 's 96n final set [ 3/3 ]
to the result of
getting a G set with
96 , 2 , mule-962 , 3/3 .[2130] Set state 's 96n final set [ 3/4 ]
to the result of
getting a G set with
96 , 2 , mule-962 , 3/4 ."mule2.3" [2126] Set state 's 94 final set [ 3/1 ] to the result of
getting a G set with
94 , 1 , tis620 , GR .[2131] Set state 's 96n final set [ 3/3 ]
to the result of
getting a G set with
96 , 2 , mule2.3 , 3/3 .[2132] Set state 's 96n final set [ 3/4 ]
to the result of
getting a G set with
96 , 2 , mule2.3 , 3/4 ."cgreek" [2133] Set state 's 96n final set [ 3/4 ]
to the result of
getting a G set with
96 , 2 , mule-962 , cgreek .[14]
This document depends on the Infra Standard .
[15]
The terms
for each ,
while ,
boolean ,
byte ,
byte sequence ,
length ,
code point ,
item ,
tuple ,
list ,
size ,
append ,
concatenation ,
extend ,
ordered map ,
entry ,
key ,
value ,
exists ,
remove an entry ,
and
is empty
are defined by the Infra Standard .
[572]
A range range is a tuple of two integers
(start , end ),
where range 's start ≦ range 's end .
It represents a set of all the integers i
that satisfies range 's start ≦ i ≦ range 's end .
[573]
A value i is in a range range if
i is an item in the set represented by range .
switch
[16]
A bit combination is a byte .
A bit combination is represented as "X /Y ",
where X and Y are integers in [ 0 , 15 ],
which represents a byte X × 16 + Y .
[89]
To append a bit combination bc
to a byte sequence bytes , run these steps:
[90] Replace bytes 's content by bytes followed by bc .[91] The empty byte sequence is a byte sequence whose length
is 0 .