pub enum Charset {
Utf8,
Latin1,
Ascii,
Other(String),
}Expand description
The character set of a description’s charset-dependent fields (s=, i=), from its
a=charset (RFC 8866 section 6.10).
Variants§
Utf8
ISO-10646 in UTF-8, the default.
Latin1
ISO-8859-1.
Ascii
US-ASCII.
Other(String)
A character set this crate does not support (or not a registered one): its strings are octet strings (RFC 8866 section 6.10: “If the identifier is not recognized or not supported, all strings that are affected by it SHOULD be regarded as octet strings”), each octet read as the character of that code point.
Implementations§
Source§impl Charset
impl Charset
Sourcepub fn named(name: &str) -> Self
pub fn named(name: &str) -> Self
The character set name identifies. RFC 8866 section 6.10: the identifier “MUST be
compared against identifiers from the ‘Name’ or ‘Preferred MIME Name’ field of the
registry using a case-insensitive comparison”; the aliases of the IANA Character Sets
registry for the three sets are recognised too.