Names That Break Software: The Edge Cases Every Test Suite Needs
O'Brien, 李, a one-letter surname, Bobby Tables: edge-case names that break real software — and how to generate them as safe, fictional test data.
By FakeName Editorial TeamPublished July 20, 2026Last updated July 20, 20268 min read
Somewhere right now, a person named O'Brien is being told their own name is invalid. A signup form rejects the apostrophe, a ticketing system stores O'Brien, a hotel confirmation prints OBRIEN. Names are the rare input that is simultaneously completely legitimate and structurally hostile — full of quoting characters, unusual lengths, and non-ASCII letters. That makes them the highest-value strings you can put in a test suite, and the easiest to get from a name generator without touching anyone's real identity.
Why names are the most underrated test data
Patrick McKenzie's classic essay lists forty falsehoods programmers believe about names — that everyone has exactly one full name, that names fit in one character set, that names have a canonical spelling, that people have first and last names in that order [kalzumeus]. The W3C's internationalization group reaches the same conclusion from field data across cultures: almost every structural assumption a form can make about a name is wrong for some large population [w3c-names]. For QA, that is good news. Each falsehood is a ready-made test case, and unlike most edge cases, name edge cases arrive on day one of launching in a new market. A test plan built on realistic, deliberately awkward names catches these failures before your users do — the same philosophy behind our broader guide to generating realistic test data.
The edge cases that actually break systems
These eight categories account for most name-related production incidents. Every example below is fictional, but each pattern has a well-documented history of breaking real software.
Apostrophes and quotes
O'Brien, D'Angelo, N'Diaye. The apostrophe is a string delimiter in SQL, an attribute quote in HTML, and a character literal in half the languages your stack is written in. Concatenate a name into any of them and you get a syntax error on a good day and an injection vector on a bad one. The other failure mode is over-correction: validation rules that reject apostrophes outright, telling a sizable fraction of Irish, Italian, and West African surnames that they do not exist.
Hyphens, spaces, and multi-word surnames
Smith-Jones, Van Der Berg, De la Cruz, García Márquez. Code that splits a full name on whitespace and calls the last token the surname silently mangles all of these — filing Van Der Berg under Berg and García Márquez under Márquez. Sorting, deduplication, and letter salutations all inherit the error. A surname is one opaque token that may itself contain spaces and hyphens; any logic that assumes otherwise needs a test case that proves it.
Very short and very long names
Both ends of the length distribution are real. The Korean surname romanized as O is a single letter; 李 is a single character. Minimum-length rules of "at least 2 characters" reject them. At the other end, real multi-part and hyphenated surnames pass 35 characters, and concatenated full names pass 70 — long enough to overflow a legacy VARCHAR(30), truncate mid-character in a UTF-8 byte limit, or wrap catastrophically in a fixed-width UI. Test one character and test forty; what happens should be deliberate in both cases.
Unicode, diacritics, and non-Latin scripts
José, Zoë, Nguyễn, 田中, محمد. Modern databases store all of them, but the pipeline around storage is where they break: a connection still set to a legacy encoding turns diacritics into mojibake, and Unicode's two ways of writing an accented letter — precomposed (NFC) or as a base letter plus combining accent (NFD) — mean two byte-identical-looking names can fail an equality check. The Unicode standard's normalization report defines the canonical forms, and the practical rule is simple: normalize to NFC at every system boundary, then test search and dedupe with both forms [unicode-nfc]. German profiles from our German identity generator are a convenient source of umlauts and ß in otherwise ordinary-looking data.
Mononyms and missing name parts
Millions of people — most famously in Indonesia — have exactly one name. No family name exists to put in your required last-name field, and real mononymous users resort to entering a dot, a dash, or the same name twice, polluting your data. Both the W3C guidance and the GOV.UK design system pattern for name fields recommend a single full-name field where the system allows, and an optional family-name field where it does not [w3c-names] [govuk-names]. Your test suite should include at least one profile with no last name at all.
Family-name-first order
In Chinese, Korean, Japanese, and Hungarian convention, the family name comes first: in 李小明, the surname is 李. A form that maps the first token to "first name" quietly swaps given name and surname for well over a billion people — the bug only surfaces later, in a greeting that addresses a customer by their family name or a legal document with the fields reversed. Test with profiles from our Chinese, Korean, and Japanese generators, which produce locale-correct names precisely so this mapping gets exercised.
Case sensitivity and internal capitals
McDonald, MacIntyre, van der Berg, DiCaprio. Naive title-casing — capitalize the first letter, lowercase the rest — produces Mcdonald and Vandenberg's cousins in every CRM export. The internal capital is part of the name's spelling, and the lowercase particle in van der Berg is equally deliberate. The safe behavior is to preserve exactly what the user typed and prove it survives a round trip through your normalization, storage, and display layers.
Whitespace and invisible characters
A trailing space pasted along with a name, a non-breaking space arriving from a copy-paste out of a web page, a zero-width joiner embedded in text copied from a messaging app. Two records that render identically but differ by an invisible byte defeat deduplication and make login-by-name mysteriously fail. The standard recipe — trim leading and trailing whitespace, collapse internal runs, strip zero-width characters, then compare — only earns trust when a test feeds it deliberately dirty input.
Little Bobby Tables: injection is a name problem
Did you really name your son Robert'); DROP TABLE Students;--?
The most famous name in software testing belongs to a fictional schoolboy whose mother named him after a SQL injection payload [xkcd-327]. The joke lands because names are the canonical untrusted input that looks trustworthy. The lesson is not to sanitize names harder — it is that parameterized queries and context-aware output encoding make the contents of the string irrelevant. A Bobby-Tables-style string belongs in your fixture set not because users are attackers, but because it proves in one assertion that no code path is building queries by concatenation.
| Test name | What it exercises | Typical failure | Fix to verify |
|---|---|---|---|
| O'Brien | Apostrophe in surname | SQL/HTML escaping errors; validator rejects the name | Parameterized queries; allow ' in name fields |
| Anne-Marie Smith-Jones | Hyphens in given and family name | Split-on-hyphen logic; over-strict character rules | Treat each name part as opaque text |
| Van Der Berg | Multi-word surname with particles | Split-on-space maps surname to Berg | Never derive surname by splitting tokens |
| O | One-character surname | Minimum-length validation rejects it | Allow single-character name parts |
| Wolfeschlegelsteinhausenbergerdorff | 35+ character surname | Column truncation; UI overflow | Length budget ≥ 100 chars; test truncation behavior |
| Nguyễn Thị Minh Khai | Diacritics + multi-part name | NFC/NFD mismatch breaks search and dedupe | Normalize to NFC at system boundaries |
| 李小明 | CJK script, family-name-first | Mojibake; given/family fields swapped | UTF-8 end to end; full-name field or explicit order |
| Suharto | Mononym, no family name | Required last-name field blocks signup | Make family name optional |
| Robert'); DROP TABLE Students;-- | SQL metacharacters (Bobby Tables) | String-concatenated queries execute the payload | Parameterized queries everywhere |
How to generate edge-case names for your test suite
A static list like the table above is a start, but real coverage means volume and variety — hundreds of profiles where the awkward names arrive embedded in otherwise consistent identities, the way they would in production. That is exactly what a locale-aware generator is for: our country generators produce names with the apostrophes, particles, diacritics, and name orders native to each locale, attached to matching addresses and phone numbers. For fixture files, the bulk generator exports up to thousands of rows as CSV, JSON, or SQL inserts you can load straight into a staging database.
- Mix locales deliberately — pull profiles from Ireland-style apostrophe-rich names, German umlauts, and CJK name order into one dataset, so every subsystem meets every category.
- Export, don't retype — generate a bulk CSV/JSON/SQL file and check it into your fixtures, so the same awkward names run on every CI build.
- Cover adjacent fields too — a username generator shows what the same person's handle looks like when the awkward characters get stripped, a separate normalization worth testing.
- Make it reproducible — seed your generation so a failing test can be re-run on identical data; see why seeding beats random test data.
Validation rules that respect real names
Testing with hostile names usually reveals that the validation layer, not the storage layer, is the real offender. The goal is to validate structure without legislating vocabulary — the approach the GOV.UK pattern codifies after user research across millions of citizens [govuk-names]:
- Do accept letters from any script, apostrophes, hyphens, spaces, and periods in every name field.
- Do trim surrounding whitespace and normalize Unicode before comparing or deduplicating — never before storing what the user typed.
- Do budget generous lengths (100 characters per field) and define truncation behavior explicitly.
- Don't require a minimum of two characters, a family name, or a Latin-script spelling.
- Don't title-case, uppercase, or otherwise "fix" capitalization the user chose.
- Don't try to sanitize names for safety — parameterize queries and encode output instead, so the name's contents never matter.
The bottom line
Names are free chaos engineering: a handful of fictional strings that jointly audit your escaping, validation, encoding, length handling, and cultural assumptions. Put the starter suite above into your fixtures, generate locale-diverse profiles in bulk so the coverage scales, and treat every name-related bug as a falsehood you can now delete from your codebase — permanently.
References & sources
- Falsehoods Programmers Believe About Names — Kalzumeus (Patrick McKenzie)
- Personal names around the world — W3C Internationalization
- Names — GOV.UK Design System pattern — GOV.UK Design System
- UAX #15: Unicode Normalization Forms — Unicode Consortium
- Exploits of a Mom (Little Bobby Tables) — xkcd
Frequently asked questions
Why do apostrophes in names break software?+
The apostrophe in O'Brien is a string delimiter in SQL and a quoting character in HTML and JavaScript. Code that concatenates a name into a query or template instead of using parameterized queries and proper encoding either throws a syntax error, corrupts the output, or — worst case — executes whatever follows the quote. Over-corrected validators that simply reject apostrophes trade a crash for locking out millions of real people.
Should a registration form require a last name?+
Only if your system genuinely cannot function without one. Mononyms — a single name with no family name — are standard in Indonesia, Myanmar, parts of India and elsewhere, so a required last-name field misrepresents real users. The W3C and the GOV.UK design system both recommend a single full-name field where possible, or making the family-name field optional when names must be split.
How long a name should I test with?+
Test both extremes. One-character surnames are real: the Korean surname romanized as O, or the Chinese surname 李 stored as a single character. At the long end, real hyphenated and multi-part surnames comfortably exceed 35 characters, and the safe engineering habit is to budget at least 100 characters per name field and test what your UI, database column, and downstream exports do at the limit — truncation should be a conscious decision, not an accident.
Are non-Latin names safe in modern databases?+
Storage is rarely the problem anymore — any UTF-8 database column stores 田中 or محمد fine. The failures happen around storage: a connection or table configured with a legacy encoding produces mojibake, search and deduplication miss matches because José can be encoded two different ways (NFC vs NFD normalization), and case-insensitive comparisons behave differently across collations. Test with accented, CJK, and right-to-left names end to end, not just at the INSERT.
Which edge-case names should be in every QA test suite?+
A useful starter set: O'Brien (apostrophe), Anne-Marie Smith-Jones (hyphens), a multi-word surname like Van Der Berg, a one-character surname, a 40-character surname, an accented name like Nguyễn, a CJK name like 李小明, a mononym, a name with a leading or trailing space, and one string of SQL metacharacters in the Bobby Tables spirit. Together they exercise escaping, validation, length limits, Unicode handling, and name-order assumptions.