From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86561 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B8rn_Mork?= Newsgroups: gmane.emacs.gnus.general Subject: Re: rfc2047 decoding Date: Wed, 06 Jan 2016 23:30:35 +0100 Organization: m Message-ID: <877fjmcpdg.fsf@nemi.mork.no> References: <8737uawenw.fsf@tullinup.koldfront.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1452119473 24169 80.91.229.3 (6 Jan 2016 22:31:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jan 2016 22:31:13 +0000 (UTC) Cc: ding@gnus.org To: asjo@koldfront.dk (Adam =?utf-8?Q?Sj=C3=B8gren?=) Original-X-From: ding-owner+M34788@lists.math.uh.edu Wed Jan 06 23:31:01 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aGwbZ-0004n0-Hz for ding-account@gmane.org; Wed, 06 Jan 2016 23:30:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aGwbK-0007si-Q7; Wed, 06 Jan 2016 16:30:42 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aGwbI-0007sC-BJ for ding@lists.math.uh.edu; Wed, 06 Jan 2016 16:30:40 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aGwbG-0007Rs-Cu for ding@lists.math.uh.edu; Wed, 06 Jan 2016 16:30:40 -0600 Original-Received: from canardo.mork.no ([148.122.252.1]) by quimby.gnus.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1aGwbE-000196-VN for ding@gnus.org; Wed, 06 Jan 2016 23:30:37 +0100 Original-Received: from nemi.mork.no (nemi.mork.no [IPv6:2001:4641:0:2:e8b:fdff:fe08:971]) (authenticated bits=0) by canardo.mork.no (8.14.4/8.14.4) with ESMTP id u06MUZOd003259 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 6 Jan 2016 23:30:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=a; t=1452119435; bh=qRD3wr7g0pB4uG+1+9kiMyNVbDYN9N7IjRJhYc+LP6Y=; h=From:To:Cc:References:Date:Message-ID:From; b=KgWgBzI1z7IaCHhFwUKJswBYnsTpeuCqVRJMXv5eGK6isgDDLGHxlmH3ucLPjuedb Bood007qSouRKTYhmfQTnOs5wNsM8aYQrUvjnpNyAV7OK/fPfzWiz89iba1TlS7G+l TLByNV69Js87vqHGqaaiHpQfs3D954oGOrh12yAkAAZCmZYw6oEgxoDRwMLtzwhqQI 27wHEM9p4O0V7iAVJrbBiMyoZL6UocZFzD0UAUm7hZ1BV8/mx99MFp0C01QooFclmU F7xcm8CwN5icXWkzft8uTcpuoJxHX/IJeG2x2mxgymZaCLhgZQUE8EsJiXfaCRxwsF tAX7ta0mwtiUw== Original-Received: from bjorn by nemi.mork.no with local (Exim 4.84) (envelope-from ) id 1aGwbD-0003wm-If; Wed, 06 Jan 2016 23:30:35 +0100 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") User-Agent: Gnus/5.130013 (Ma Gnus v0.13) Emacs/24.5 (gnu/linux) X-Virus-Scanned: clamav-milter 0.98.7 at canardo X-Virus-Status: Clean X-Spam-Score: -5.0 (-----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86561 Archived-At: asjo@koldfront.dk (Adam Sj=C3=B8gren) writes: > What is the correct decoding of this header: > > Subject: =3D?UTF-8?Q?Hackerangreb=3D20mod=3D20it=3D2Dl?=3D > =3D?UTF-8?Q?everand=3DC3=3DB8r=3D20bag=3D20app=3D20ti?=3D =3D?UTF-8?Q?l= =3D20DSB?=3D' > =3D?UTF-8?Q?s=3D20gr=3DC3=3DA6nsekontrol?=3D > > Is it: > > "Hackerangreb mod it-leverand=C3=B8r bag app til DSB' s gr=C3=A6nsekontr= ol" - or: > "Hackerangreb mod it-leverand=C3=B8r bag app til DSB's gr=C3=A6nsekontro= l" ? > > 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 "=3D?UTF-8?Q?l=3D20DSB?=3D'" 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=C3=B8r bag app ti=3D?UTF-8?Q?l=3D20DSB?=3D'= s gr=C3=A6nsekontrol" But I believe both your examples are more reasonable attempts in the spirit of rfc1123. Bj=C3=B8rn