Visual RFC.
ALL RFCs / RFC 8187
Read the RFC ↗

RFC 8187 / START HERE

HTTP parameters, before the details

Character encoding and language for HTTP field parameters

This RFC lets an HTTP field definition carry international text in a name=value parameter. A character encoding turns text into bytes; percent escapes carry those bytes as ASCII, alongside an optional language tag.

The idea in one picture

  1. A field definition adopts the encoding

  2. Text becomes UTF-8 bytes and percent escapes

  3. A recipient decodes under that field’s rules

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

A download label or web-link title can contain characters such as £ or €. Ordinary HTTP field syntax does not provide one universal way to interpret such bytes. RFC 8187 defines an explicit encoding that each adopting field can use; it replaces RFC 5987.

A familiar example

The fictional field example title*=utf-8'en'%C2%A3%20rates represents the English text £ rates. UTF-8 is required, the language tag is optional, and decoding the text does not prove its meaning or trustworthiness. This encoding does not apply to multipart message bodies.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. Opt in at the field definitionAn HTTP field definition can adopt this encoding for a specific text parameter. An asterisk on an unfamiliar parameter name does not automatically give it these semantics.
  2. Read charset, language and valueAn extended value has a required character-encoding label, an optional language tag and encoded value data, separated by two apostrophes.
  3. Encode characters into UTF-8 bytesFirst turn text into UTF-8 bytes. Then represent bytes outside attr-char as percent escapes; this is byte encoding, not an HTML form or a recursive decoder.
  4. Handle errors and fallback deliberatelyRecipients 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.
  5. Compatibility and trust limitsThe successor removes mandatory Latin-1 support but keeps UTF-8 required. Successful decoding still cannot prove that similar-looking or multilingual values mean the same thing.
Start with chapter one →

This introduction explains RFC 8187 (2017). Read the original RFC ↗