Keep basic prefix matches
02Filtering returns all matching labels, possibly none. Basic filtering checks an exact label or a prefix ending at a whole-subtag boundary. It does not search inside a tag.
de-Deva fails the boundary check. de-Latn-DE fails the required prefix sequence. Two labels remain, rather than one chosen winner.
Key idea: A matching basic prefix must end just before a hyphen, not partway through a subtag.
Terms
- Basic filtering
- Return every label that equals a range or extends it at a hyphen boundary.
- Result set
- All qualifying items, including an empty set when none qualify.
Rules & examples
A matching basic prefix must end just before a hyphen, not partway through a subtag.
- Compare without case distinctions. A basic range matches when it equals the tag, or equals a prefix whose next character is a hyphen.
- de-DE matches de-DE and de-DE-1996. It does not match de-Deva, where the apparent prefix ends inside Deva, or de-Latn-DE, where Latn intervenes.
- The basic range * matches any tag under these rules. A using protocol MAY add wildcard semantics; this is not a complete HTTP Accept-Language negotiator.
- Filtering returns a set, not one preferred item. The using application MAY leave the result unordered. String prefix similarity need not mean mutual comprehension.
The finite candidate set follows the RFC examples. Display order is illustrative; HTTP weights, exclusions, translation and language-tag validation are outside this comparison.
Sources
New to this? Start hereA quick picture + helpful background
Requested languages and available labels
Imagine a catalog of labeled documents. A filter keeps all labels that fit a pattern; a lookup tries preferences and returns one exact label or a defined default. Neither operation translates the document or guarantees understanding.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.