[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Questions about 1522 encoding scheme
Today I got a question about 1522 encodings which I was
unable to answer, so I hope some of you can help me.
1522 states in section 5 that:
Ordinary ASCII text and encoded-words may appear together in the
same header field. However, an encoded-word that appears in a
header field defined as "*text" MUST be separated from any
adjacent encoded-word or "text" by linear-white-space.
A "Q"-encoded encoded-word which appears in a comment MUST NOT
contain the characters "(", ")" or " encoded-word that appears in
a "comment" MUST be separated from any adjacent encoded-word or
"ctext" by linear-white-space.
and in section 6.2
When displaying a particular header field that contains multiple
encoded-words, any linear-white-space that separates a pair of
adjacent encoded-words is ignored. (This is to allow the use of
multiple encoded-words to represent long strings of unencoded text,
without having to separate encoded-words where spaces occur in the
So, as far as I can see the line
Should be presented as
...because the space between the encoded words should be deleted
when displaying the text. So, the space that must be there
must be in one of the encoded words.
But, what happens when you mix encoded words with text?
You must have space between the encoded word and the text, so
I presume that the spaces after the encoded word should be
So, I would like the above string to be displayed as:
But, the RFC sais as you can see that "linear whitespace", not
_one_ space character, is to be deleted so the encoded word:
should be displayed as
(note that the '_' is missing from this encoded word)
So, now my question/statement which I must have confirmed:
Any whitespace in a text that is to be encoded, or adjacing
to text that is to be encoded, must also be encoded?