Charset
The Content-Type parameter naming how a text part's bytes map to characters, such as utf-8 or iso-8859-1; a wrong value garbles accented and non-Latin text.
What it means
A text part declares its character set in its Content-Type, as in text/html; charset=utf-8. When none is given, MIME defaults to US-ASCII (RFC 2046). Header text names its charset inside each encoded-word instead. UTF-8 (RFC 3629) covers every script and is the sensible choice for new mail.
A mismatch produces mojibake, such as é where é was meant, which is what UTF-8 bytes look like when read as Latin-1. Declaring UTF-8 and actually encoding the text in UTF-8, in both the plain-text and HTML parts, avoids it; an HTML meta tag naming a different charset from the MIME header invites the same confusion.
Related terms
Sources
What this definition rests on. The wording is ours; the facts are theirs.
- RFC 2046, section 4.1.2: Charset Parameterrfc-editor.org
- RFC 3629: UTF-8, a transformation format of ISO 10646rfc-editor.org
All 432 terms in the glossaryThe wiki: blocklists and bounce codes