Gnus development mailing list
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: asjo@koldfront.dk (Adam Sjøgren)
Cc: ding@gnus.org
Subject: Re: rfc2047 decoding
Date: Wed, 06 Jan 2016 23:30:35 +0100	[thread overview]
Message-ID: <877fjmcpdg.fsf@nemi.mork.no> (raw)
In-Reply-To: <8737uawenw.fsf@tullinup.koldfront.dk> ("Adam =?utf-8?Q?Sj?= =?utf-8?Q?=C3=B8gren=22's?= message of "Wed, 06 Jan 2016 23:01:39 +0100")

asjo@koldfront.dk (Adam Sjøgren) writes:

> What is the correct decoding of this header:
>
> Subject: =?UTF-8?Q?Hackerangreb=20mod=20it=2Dl?=
>  =?UTF-8?Q?everand=C3=B8r=20bag=20app=20ti?= =?UTF-8?Q?l=20DSB?='
>  =?UTF-8?Q?s=20gr=C3=A6nsekontrol?=
>
> Is it:
>
>  "Hackerangreb mod it-leverandør bag app til DSB' s grænsekontrol" - or:
>  "Hackerangreb mod it-leverandør bag app til DSB's grænsekontrol" ?
>
> Gnus decodes it to the first line. So I'm inclined to think that is
> correct.
>
> Perl's Encode::MIME::Header decodes it to the second line. But it also
> encoded the text in the first place, so I guess it {s,w}ould roundtrip.
>
> What gives?

The "=?UTF-8?Q?l=20DSB?='" part of the header is invalid:

    Ordinary ASCII text and 'encoded-word's 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'.


So the formally correct decoding would be:

  "Hackerangreb mod it-leverandør bag app ti=?UTF-8?Q?l=20DSB?='s grænsekontrol"

But I believe both your examples are more reasonable attempts in the
spirit of rfc1123.


Bjørn



  reply	other threads:[~2016-01-06 22:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 22:01 Adam Sjøgren
2016-01-06 22:30 ` Bjørn Mork [this message]
2016-01-06 23:02   ` Adam Sjøgren
2016-01-26 20:59     ` Adam Sjøgren
2016-01-07  0:45 ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fjmcpdg.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=asjo@koldfront.dk \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).