Accept-Charset
The Accept-Charset header describes which character sets are acceptable in textual response content.
As most servers have standardized on using UTF-8, use of this header has disappeared.
Overview table
- Name
- Accept-Charset
- Description
- Indicates which character sets are acceptable in responses.
- Direction
- Request
- Negotiates
- Content-Type (the character set of the media type)
- List usage in
- Vary
- Specification
- RFC 9110: HTTP Semantics §12.5.2. Accept-Charset
Syntax
Accept = #( media-range [ accept-params ] ) media-range = ( "*/*" / ( type "/" "*" ) / ( type "/" subtype ) ) *( OWS ";" OWS parameter ) accept-params = weight *( accept-ext ) accept-ext = OWS ";" OWS token [ "=" ( token / quoted-string ) ]
Examples
Prefer HTML or text/x-c, or text/x-dvi if it’s the best the server has after a 20% markdown in quality, or plain text after a 50% markdown in quality:
Accept: text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c
Prefer XHTML or HTML, or generic XML with a reduced preference, or else any content:
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8