Accept-Charset
tells the server what character sets the client accepts.
Parameter | Description |
---|---|
type | A character set name. This can also be a * for all character sets |
QualityFactor | The quality factor in the format ;q=0.8 (optional) |
Accept-Charset
takes a number of character sets and includes an optional preference for which one the server should use. The charset is one from the list
of available charsets at IANA "Character Sets" registry. For example UTF-8
.
The charset is separated by commas with an optional quality factor (using a ;q=
) that is
used the clients preference for using this type. The quality factor has a value from 0 to 1 with the higher the number the more preference for that type.
If this header is not included then the client will accept any charset.
The server uses Content-Type
to inform the client what character set it is using.
If the server can't find an acceptable charset to reply with then it should send a 406 (not acceptable) response or ignore this header and not doing any content negotiation.