Control Characters in Unicode: The Invisible Operators

· 2 min read

Control characters are non-printing code points that were originally designed to control hardware devices like printers and terminals. Many have been repurposed or become vestigial, but several remain in everyday use. Understanding them helps when debugging text processing issues and data pipelines.

The C0 Controls (0–31)

The first 32 code points of Unicode (U+0000–U+001F) are inherited from ASCII's C0 control characters. The most commonly encountered today are: NUL (U+0000) — the null character, used as a string terminator in C; HT (U+0009) — horizontal tab; LF (U+000A) — line feed / newline on Unix; CR (U+000D) — carriage return, used with LF for Windows line endings (CRLF); and DEL (U+007F) — originally a delete/erasure character on paper tape. Browse all of them in the ASCII table.

The C1 Controls (128–159)

Code points U+0080–U+009F are the C1 controls, defined by ISO 6429. In true Latin-1, these are control characters; in Windows-1252, they're repurposed as printable characters. Because browsers treat Latin-1 as Windows-1252, C1 control characters effectively cannot be used in HTML documents served as text/html.

Unicode-Specific Controls

Beyond the inherited ASCII controls, Unicode defines additional formatting characters: the Zero Width No-Break Space / BOM (U+FEFF), bidirectional formatting characters (U+200E–U+200F, U+202A–U+202E), and interlinear annotation characters. These are categorized as "Format" characters rather than true controls but have similar invisible behavior.

Control Characters in Data

Control characters in unexpected places frequently cause bugs: a NUL byte in a string truncates it in C-based systems; CR characters in Unix text files appear as ^M at line ends; a BEL character in terminal output triggers an audible alert. Use our text encoder to inspect strings for hidden control characters.

More Articles

View all articles