DEL (Delete) is ASCII code point 127 (0x7F), Unicode U+007F. It is the only control character outside the C0 range — sitting at the top of the 7-bit table instead of the bottom. On paper tape, punching all seven holes produced 0x7F, effectively "erasing" a misstruck character since an all-holes punch carried no data. Many modern terminals emit 0x7F rather than BS (0x08) when the Backspace key is pressed — the source of the persistent BS-vs-DEL confusion that stty erase and readline configs exist to resolve. UTF-8 encodes it as the single byte 0x7F; Unicode classifies it as Cc (Control) with the alias DELETE.
unsigned char b = 0x7F; // DEL from a terminalif (b == 0x7F) len = (len ? len - 1 : 0); // erase previous charline[len] = '\0'; // keep buffer NUL-terminated
It's the only control character above 31. On paper tape, all seven holes punched (binary 1111111 = 127) was used to 'rub out' a mistake — you could punch over any wrong character and it would become a DEL, effectively erasing it.
Backspace (ASCII 8) moves the cursor left and typically erases what's behind it. Delete (ASCII 127) removes the character at or ahead of the cursor. In practice, terminal emulators handle them inconsistently, which causes endless configuration headaches.
Modern keyboards usually send an escape sequence (like ESC[3~) for the Delete key, not the raw ASCII 127 byte. The mapping depends on your terminal emulator, TERM setting, and keyboard configuration — it's one of the most notoriously inconsistent areas in terminal setup.
Yes. Since 0x7F is a control character, it can interfere with text processing, break terminal displays, and cause issues in protocols that don't expect control bytes in data fields. Most text sanitization routines strip it along with the C0 controls.