MBOX-Line: From dkarp at zimbra.com  Sun Oct 28 15:43:57 2012
To: imap-protocol@u.washington.edu
From: Dan Karp <dkarp@zimbra.com>
Date: Fri Jun  8 12:34:49 2018
Subject: [Imap-protocol] Decoding RFC2047-encoded data from ENVELOPE fields
In-Reply-To: <508DB1F7.5050409@flaska.net>
References: <508DB1F7.5050409@flaska.net>
Message-ID: <1025575261.320657.1351464237050.JavaMail.root@zimbra.com>

> What's the correct decoding of "Domen =?UTF-8?Q?Ko=C5=BEar?=" -- is
> the space found after "Domen" in the input to be included in the
> decoded output? This is a real example of what Evolution 2.30.2
> produces (my apologies to Domen for bringing the attention to his
> mail). Thunderbird renders that as two words separated by space.
> 
> I'm asking because an example in the RFC says that this:
> 	"(=?ISO-8859-1?Q?a?= b)"
> shall decode into "(ab)". There's no example for the other order of
> elements.

You've got a bad copy of RFC 2047.  The example actually reads

   encoded form                                displayed as
   ---------------------------------------------------------------------
   (=?ISO-8859-1?Q?a?= b)                      (a b)

           Within a 'comment', white space MUST appear between an
           'encoded-word' and surrounding text.  [Section 5,
           paragraph (2)].  However, white space is not needed between
           the initial "(" that begins the 'comment', and the
           'encoded-word'.

- Dan

