RFC2047 (Message Header Extensions for Non-ASCII Text) specifies how non-ASCII text in headers are to be encoded. This is actually rather complicated, so a number of variables are necessary to tweak what this library does.
The following variables are tweakable:
The keys can either be header regexps, or
The values can be
nil, in which case the header(s) in question
won't be encoded,
mime, which means that they will be encoded, or
address-mime, which means the header(s) will be encoded carefully
assuming they contain addresses.
Q(a Quoted-Printable-like encoding) and
B(base64). This alist specifies which charset should use which encoding.
rfc2047-encoded-word-regexpis made loose.
rfc2047-encoded-word-regexpis used to look for such words.
rfc2047-encoded-word-regexp-looseis used instead of
rfc2047-encoded-word-regexpto look for encoded words.
Those were the variables, and these are this functions:
rfc2231-encode-stringfunction, that is the standard but many mailers don't support it. See rfc2231.