乐闻世界logo
搜索文章和话题

What are ASCII control characters and their uses

2026年2月21日 16:17

Detailed explanation of ASCII control characters (0-31 and 127):

Classification of Control Characters:

1. Communication Control Characters:

  • SOH (0x01): Start of Heading
  • STX (0x02): Start of Text
  • ETX (0x03):End of Text
  • EOT (0x04): End of Transmission
  • ENQ (0x05): Enquiry
  • ACK (0x06): Acknowledge
  • NAK (0x15): Negative Acknowledge

2. Format Control Characters:

  • BS (0x08): Backspace
  • HT (0x09): Horizontal Tab
  • LF (0x0A): Line Feed
  • VT (0x0B): Vertical Tab
  • FF (0x0C): Form Feed
  • CR (0x0D): Carriage Return

3. Information Separation Characters:

  • FS (0x1C): File Separator
  • GS (0x1D): Group Separator
  • RS (0x1E): Record Separator
  • US (0x1F): Unit Separator

4. Other Control Characters:

  • NUL (0x00): Null
  • BEL (0x07): Bell
  • CAN (0x18): Cancel
  • ESC (0x1B): Escape
  • DEL (0x7F): Delete

Common Applications:

  • CRLF (0x0D 0x0A): Windows line ending
  • LF (0x0A): Unix/Linux line ending
  • CR (0x0D): Old Mac line ending
  • TAB (0x09): Tab character for indentation and alignment
标签:ASCII