Character Encoding
The mapping between characters and bytes, and the source of a specific family of invisible bugs.
Character encoding is the correspondence between characters and their byte representation. Unicode assigns a code point to every character; UTF-8 encodes those code points as one to four bytes, is backward-compatible with ASCII, and has won.
Even with the encoding war settled, several distinctions still cause bugs. A code point is not a character a person would recognize: emoji with modifiers, and accented letters written as a base plus a combining mark, span several. So "length" has at least three meanings — bytes, code points, and grapheme clusters — and string operations that split or reverse text will produce nonsense if they use the wrong one. Normalization matters too, since visually identical strings can differ in bytes.
The sharpest practical hazard is control characters, and particularly the null byte. A file containing a real null is still valid text to a compiler and a formatter, renders as innocuous whitespace in most viewers, and causes search tools to treat the file as binary and suppress all matches silently. A search that returns nothing therefore looks like an absent symbol rather than a corrupted file. Inspecting the bytes is the only way to see it. See Silent Failure.
Terminal alignment is a related concern: East Asian characters occupy two columns and combining marks occupy none, so column arithmetic must use display width. See Terminal User Interface.
See also13
Glob
Wildcard pattern matching over filenames, similar enough to regular expressions to mislead.
Systems & Tooling12 connections
Token
The sub-word unit a language model actually reads and writes; the unit of cost and of context.
Agents & Language Models22 connections
Shell
The interactive command interpreter, and a programming language with unusually sharp edges.
Systems & Tooling24 connections
Vacuous Truth
A statement that holds only because its subject set is empty — a green result that measured nothing.
Method26 connections
Truncation Bias
Reading a truncated result as if it were the whole result, so every counterexample is invisible.
Method28 connections
Ground Truth
The measurement that arbitrates, as opposed to the artifact that merely reports.
Method99 connections
Falsifiability
A claim is only worth something if you know what observation would refute it.
Method47 connections
Coverage Gate
A build check that fails when coverage falls below a threshold, and what that pressure produces.
Testing & Verification16 connections
ANSI Escape Code
The in-band byte sequences, starting with the escape character, that tell a terminal to move the cursor, change color, or clear the screen, inherited from 1970s video terminals and still how every command-line tool draws.
Systems & Tooling12 connections
Emoji
Picture characters encoded in Unicode, born on Japanese phones in the late 1990s, drawn differently by every platform, and built from sequences of code points that break naive string handling.
Design & Interface9 connections
Text Truncation
Cutting text that doesn't fit and marking the cut with an ellipsis, a layout convenience that hides information, breaks in other languages, and needs care to stay accessible.
Design & Interface8 connections
Input Method
The software layer that turns keystrokes into text for writing systems with far more characters than a keyboard has keys, such as Chinese, Japanese and Korean, by letting people type sounds or shapes and choose from candidates.
Systems & Tooling8 connections
Base64
A way to write arbitrary bytes using 64 safe text characters, so binary data can travel through email, JSON, URLs, and other channels built for text, at the cost of a third more size and with no secrecy at all.
Data & Content8 connections
Linked from24
- ANSI Escape CodeSystems & Tooling
The in-band byte sequences, starting with the escape character, that tell a terminal to move the cursor, change color, or clear the screen, inherited from 1970s video terminals and still how every command-line tool draws.
- Automatic Speech RecognitionAgents & Language Models
Turning audio into text, and the reasons real-world accuracy is set by the signal more than by the model.
- Base64Data & Content
A way to write arbitrary bytes using 64 safe text characters, so binary data can travel through email, JSON, URLs, and other channels built for text, at the cost of a third more size and with no secrecy at all.
- Byte-Pair EncodingAgents & Language Models
The compression trick that splits text into the tokens a language model reads, by repeatedly merging the most frequent pair of symbols into a new one.
- CSVData & Content
The plain-text table format of rows separated by line breaks and fields separated by commas, universal and simple until quoting, encoding, and spreadsheets get involved.
- EmojiDesign & Interface
Picture characters encoded in Unicode, born on Japanese phones in the late 1990s, drawn differently by every platform, and built from sequences of code points that break naive string handling.
- Input MethodSystems & Tooling
The software layer that turns keystrokes into text for writing systems with far more characters than a keyboard has keys, such as Chinese, Japanese and Korean, by letting people type sounds or shapes and choose from candidates.
- Internationalized Domain NameWeb Platform
Domain names written in non-Latin scripts and accented letters, made to work in an ASCII-only DNS by encoding them as xn-- strings, and the browser rules that decide when to show the real characters and when to show the code to block lookalike attacks.
- Lexical AnalysisComputation & Algorithms
The first stage of reading a program, which groups a stream of characters into tokens such as names, numbers, operators and keywords, usually using regular expressions compiled into a finite automaton, so the parser can work with words rather than letters.
- Line EndingSystems & Tooling
The invisible characters marking where a line of text ends, split three ways since the teletype era between Unix, Windows, and classic Mac OS, and still breaking scripts and diffs.
- MIME TypeWeb Platform
The short type/subtype label, born in email, that tells a browser how to treat a response, and why browsers that guess when it's missing turned a convenience into a security hole.
- PHPWeb Platform
The server-side language that began in 1994 as a personal set of homepage tools, spread on cheap shared hosting to run much of the web including WordPress and early Facebook, and survived years of ridicule by getting much faster and stricter.
- Postal AddressData & Content
The everyday string that tells a carrier where to deliver mail, far less regular than forms assume, with postal codes that are delivery routes rather than areas, and a long list of countries and people that don't fit the standard fields.
- ShellSystems & Tooling
The interactive command interpreter, and a programming language with unusually sharp edges.
- SlugData & Content
The short, readable, hyphenated part of a URL that names a page, borrowed from newsroom jargon, simple to generate and surprisingly hard to keep stable once other people link to it.
- SMSNetworks & Distribution
Text messages of up to 160 characters sent between mobile phones, designed in the 1980s as a side feature of the GSM standard and grown into a global habit, a login code channel, and a fraud vector.
- SQL InjectionData & Content
An attack in which user input is pasted into a database query and gets run as code, prevented by keeping the query and its data in separate channels.
- Terminal User InterfaceGraphics & Rendering
An interface rendered as text in a terminal, and the design conventions that make command-line tools humane.
- Text TruncationDesign & Interface
Cutting text that doesn't fit and marking the cut with an ellipsis, a layout convenience that hides information, breaks in other languages, and needs care to stay accessible.
- Time ZoneSystems & Tooling
Civil time is a political layer over solar time, and its rules change often enough to be data.
- TokenAgents & Language Models
The sub-word unit a language model actually reads and writes; the unit of cost and of context.
- URLWeb Platform
The address format that names every resource on the web, its parts from scheme to fragment, and why parsing one correctly is harder and more security-relevant than it looks.
- Video Game LocalizationPlay & Games
Translating a game plus adapting it for a new market, and the drift that adaptation introduces.
- XDG Base Directory SpecificationSystems & Tooling
A convention placing configuration, data, cache, and state in defined directories rather than the home directory.