André Caron
André Caron

Reputation: 45284

Scope of "charset" in Content-Type HTTP header

HTTP responses generated by the Pyramid web framework append ; charset=UTF-8 to the Content-Type HTTP header. For example,

Content-Type: application/json; charset=UTF-8

Section 14.17 of RFC 2616 gives an example of this:

Content-Type: text/html; charset=ISO-8859-4

However, there's no description of the role of this charset "property". What scope does this have, and who interprets it?

Upvotes: 1

Views: 1107

Answers (1)

Rowland Shaw
Rowland Shaw

Reputation: 38129

It defines the character encoding of the entity being transferred, and can be interpreted by the remote user. Pyramid is telling everyone that it only ever talks to people in UTF-8, rather than defaulting to ISO-8859-1.

Upvotes: 3

Related Questions