我误读了问题并回答,好像它是另一种空白。在这种情况下,空格出现在 MIME 单词中,而不是多个由空格分隔的单词。
这种事情是明确不允许的。从RFC2047中的格式介绍:
2. Syntax of encoded-words
An 'encoded-word' is defined by the following ABNF grammar. The
notation of RFC 822 is used, with the exception that white space
characters MUST NOT appear between components of an 'encoded-word'.
然后在同一部分:
IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's
by an RFC 822 parser. As a consequence, unencoded white space
characters (such as SPACE and HTAB) are FORBIDDEN within an
'encoded-word'. For example, the character sequence
=?iso-8859-1?q?this is some text?=
would be parsed as four 'atom's, rather than as a single 'atom' (by
an RFC 822 parser) or 'encoded-word' (by a parser which understands
'encoded-words'). The correct way to encode the string "this is some
text" is to encode the SPACE characters as well, e.g.
=?iso-8859-1?q?this=20is=20some=20text?=
The characters which may appear in 'encoded-text' are further
restricted by the rules in section 5.
较早的答案
这种事情是明确允许的。带有 MIME 词的标题应为 76 个字符或更少,并在需要时折叠。 RFC822 折叠标头缩进第二行和任何附加行。 RFC2047 标头应该只缩进一个空格。第一行的 ?= 和 =? 之间的空格应该从输出中抑制。
参见 RFC 第 12 页底部的示例:
encoded form displayed as
---------------------------------------------------------------------
(=?ISO-8859-1?Q?a?= (ab)
=?ISO-8859-1?Q?b?=)
Any amount of linear-space-white between 'encoded-word's,
even if it includes a CRLF followed by one or more SPACEs,
is ignored for the purposes of display.