WIPIVERSE All articles

End-of-Text character

The End‑of‑Text character (abbreviated ETX) is a control character in the ASCII and Unicode character sets that signals the termination of a text block. Its code points are:

  • ASCII: decimal 3, hexadecimal 0x03, binary 000 00011.
  • Unicode: U+0003 (identical to the ASCII value).

Function and Usage

ETX is primarily used in communications protocols and data streams to indicate that the preceding sequence of characters constitutes a complete unit of text. Common contexts include:

  • Teleprinter and early computer communications – ETX marked the end of a message before the start‑of‑heading (SOH) or start‑of‑text (STX) characters.
  • Serial communication protocols – ETX can delimit messages where variable‑length data are transmitted.
  • File formats and data interchange – Some legacy file specifications embed ETX to flag the termination of a textual segment.

When a receiving system encounters ETX, it typically stops reading the current text segment and proceeds to process subsequent data or to await the next control sequence.

Historical Background

The ETX character originates from the original 1963 ASCII standard, which defined a set of 33 control characters for teletype and data transmission purposes. ETX was positioned after the End‑of‑Transmission (EOT) character (code 4) and before the Enquiry (ENQ) character (code 5). Its intended purpose was to provide a clear delimiter for text blocks, complementing other control characters such as Start‑of‑Text (STX, code 2).

Representation in Software

In many programming environments and text editors, ETX can be represented and inserted using escape sequences:

  • C, C++, Java, Python, etc. – '\x03' or '\003'.
  • Shell utilities – Ctrl‑C (interrupt) is historically associated with ETX, though modern terminals often map Ctrl‑C to the interrupt signal rather than transmitting the ETX byte.

Related Control Characters

Symbol Name ASCII Code
NUL Null (zero) 0
SOH Start of Heading 1
STX Start of Text 2
ETX End of Text 3
EOT End of Transmission 4
ENQ Enquiry 5

These characters collectively facilitated structured communication before the widespread adoption of higher‑level protocols that embed length fields or explicit delimiters.

Browse

More topics to explore

    Browse all articles