Handle errors and fallback deliberately
04Recipients need robust handling of malformed escapes and invalid UTF-8, but this RFC does not prescribe one recovery algorithm. Parameter precedence belongs to the adopting field’s rules.
The official example offers title="EURO exchange rates" and title*=utf-8''%e2%82%ac%20exchange%20rates. A recipient following the suggested precedence chooses € exchange rates; the fallback remains for legacy recipients.
Source for this drawing: RFC 8187 · Read RFC section 4.2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
- Malformed escape
- A percent sign without exactly two following hexadecimal digits in the encoded sequence.
- Replacement character
- A visible substitute such as U+FFFD for a sequence that cannot be decoded.
- Fallback
- An ordinary ASCII parameter accompanying the extended value for older recipients.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Detect invalid encoding without inventing a universal recovery or fallback rule.
- Malformed or incomplete percent escapes and non-decodable byte sequences need robust handling. RFC 8187 lists ignoring the parameter, stripping a bad sequence or substituting a replacement character as acceptable strategies; it mandates none of these particular strategies.
- Field specifications need to define whether repeated identical parameter names are allowed and how they are processed. RFC 8187 advises against multiple extended parameters with identical names for MIME compatibility; it does not supply one duplicate-resolution algorithm.
- RFC 8187 suggests that extended syntax take precedence over a corresponding ordinary parameter. Its example carries an ASCII fallback and a UTF-8 title*. This suggestion is not a universal uppercase MUST overriding field-specific rules.
The malformed %G0 and overlong UTF-8 C0 AF examples illustrate failed decoding, not an RFC-required rejection of the entire response. The fallback example assumes an adopting field follows the suggested precedence. title and title* are different names; that example does not authorize repeated identical title* names.
Read the RFC section ↗