1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id CC4B6431FC2
\r
6 for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 10:36:58 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id dmSq6UU7e4Fk for <notmuch@notmuchmail.org>;
\r
16 Wed, 11 Sep 2013 10:36:50 -0700 (PDT)
\r
17 Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com
\r
18 [74.125.83.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 2997E431FAE for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 10:36:50 -0700
\r
22 Received: by mail-ee0-f54.google.com with SMTP id e53so4796355eek.13
\r
23 for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 10:36:49 -0700 (PDT)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=1e100.net; s=20130820;
\r
26 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
27 :references:mime-version:content-type:content-transfer-encoding;
\r
28 bh=wU5qWneC9ErL8JJ7pYsWGnDM/JX0R6mdfnhcW1F1nOU=;
\r
29 b=I1kCpiiGzNNrsCVHbAbhVSnKkrLrvF3orqR8ydcqh5256DeiWM7nKKmkHmz6/1TAxf
\r
30 /ZS9thqwblOEXZq1JGdA4Zrfe0qDoKTI6vprw6tNi6HxmPpzkUNJdRfFedT1qBZqABl/
\r
31 Fi7RvH9ZT2ursNvy9W6SSU6/OUr0L8j1JLlgupyGhYXKaXW2OhRLRC3MNHvrJ62R6eyz
\r
32 xfCjno+zW3vuuw9Feqb5dbI+ydrzS1X9QxNb4UFUgIEta8ciJOG0xfXW1AyII4VsreKL
\r
33 kMj6xImdRwMwEo0L3hj985Th+pWoRcbc3V/IOAbx1+TEycW4hiVzEyw9uKkH57ey5hsU
\r
36 ALoCoQmTtTKDhipux0V2MsmQCzBFdFXg4Gn9ugSYBkU9sxbnGqt4R5ulsvck0H2u7hvqppmyON0M
\r
37 X-Received: by 10.14.224.198 with SMTP id x46mr3895753eep.53.1378921008856;
\r
38 Wed, 11 Sep 2013 10:36:48 -0700 (PDT)
\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
40 [88.195.111.91]) by mx.google.com with ESMTPSA id
\r
41 x47sm42075542eea.16.1969.12.31.16.00.00
\r
42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
43 Wed, 11 Sep 2013 10:36:48 -0700 (PDT)
\r
44 From: Jani Nikula <jani@nikula.org>
\r
45 To: notmuch@notmuchmail.org
\r
46 Subject: [PATCH v2 2/2] lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to
\r
48 Date: Wed, 11 Sep 2013 20:36:43 +0300
\r
49 Message-Id: <1378921003-14639-2-git-send-email-jani@nikula.org>
\r
50 X-Mailer: git-send-email 1.8.4.rc3
\r
51 In-Reply-To: <1378921003-14639-1-git-send-email-jani@nikula.org>
\r
52 References: <8738pcjet4.fsf@awakening.csail.mit.edu>
\r
53 <1378921003-14639-1-git-send-email-jani@nikula.org>
\r
55 Content-Type: text/plain; charset=UTF-8
\r
56 Content-Transfer-Encoding: 8bit
\r
57 Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Wed, 11 Sep 2013 17:36:59 -0000
\r
72 As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]:
\r
74 > Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init()
\r
75 > *should* solve the decoding problem mentioned in the thread. This
\r
76 > flag should be safe to pass into g_mime_init() without any bad side
\r
77 > effects and my unit tests do test that code-path.
\r
79 The thread being referred to is [2].
\r
81 [1] id:87bo56viyo.fsf@nikula.org
\r
82 [2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com
\r
84 lib/database.cc | 2 +-
\r
86 lib/message-file.c | 2 +-
\r
88 test/encoding | 3 ---
\r
89 5 files changed, 4 insertions(+), 7 deletions(-)
\r
91 diff --git a/lib/database.cc b/lib/database.cc
\r
92 index 5cc0765..bb4f180 100644
\r
93 --- a/lib/database.cc
\r
94 +++ b/lib/database.cc
\r
95 @@ -655,7 +655,7 @@ notmuch_database_open (const char *path,
\r
97 /* Initialize gmime */
\r
98 if (! initialized) {
\r
100 + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
\r
104 diff --git a/lib/index.cc b/lib/index.cc
\r
105 index a2edd6d..78c18cf 100644
\r
108 @@ -440,7 +440,7 @@ _notmuch_message_index_file (notmuch_message_t *message,
\r
109 static bool mbox_warning = false;
\r
111 if (! initialized) {
\r
113 + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
\r
117 diff --git a/lib/message-file.c b/lib/message-file.c
\r
118 index 4d9af89..a2850c2 100644
\r
119 --- a/lib/message-file.c
\r
120 +++ b/lib/message-file.c
\r
121 @@ -228,7 +228,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
122 is_received = (strcmp(header_desired,"received") == 0);
\r
124 if (! initialized) {
\r
126 + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
\r
130 diff --git a/notmuch.c b/notmuch.c
\r
131 index 78d29a8..7300c21 100644
\r
134 @@ -264,7 +264,7 @@ main (int argc, char *argv[])
\r
136 local = talloc_new (NULL);
\r
139 + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
\r
140 #if !GLIB_CHECK_VERSION(2, 35, 1)
\r
143 diff --git a/test/encoding b/test/encoding
\r
144 index 7372b6b..8609652 100755
\r
145 --- a/test/encoding
\r
146 +++ b/test/encoding
\r
147 @@ -30,19 +30,16 @@ output=$(notmuch search tučňáččí 2>&1 | notmuch_show_sanitize)
\r
148 test_expect_equal "$output" "thread:0000000000000002 2001-01-05 [1/1] Notmuch Test Suite; ISO-8859-2 encoded message (inbox unread)"
\r
150 test_begin_subtest "RFC 2047 encoded word with spaces"
\r
151 -test_subtest_known_broken
\r
152 add_message '[subject]="=?utf-8?q?encoded word with spaces?="'
\r
153 output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)
\r
154 test_expect_equal "$output" "thread:0000000000000003 2001-01-05 [1/1] Notmuch Test Suite; encoded word with spaces (inbox unread)"
\r
156 test_begin_subtest "RFC 2047 encoded words back to back"
\r
157 -test_subtest_known_broken
\r
158 add_message '[subject]="=?utf-8?q?encoded-words-back?==?utf-8?q?to-back?="'
\r
159 output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)
\r
160 test_expect_equal "$output" "thread:0000000000000004 2001-01-05 [1/1] Notmuch Test Suite; encoded-words-backto-back (inbox unread)"
\r
162 test_begin_subtest "RFC 2047 encoded words without space before or after"
\r
163 -test_subtest_known_broken
\r
164 add_message '[subject]="=?utf-8?q?encoded?=word without=?utf-8?q?space?=" '
\r
165 output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)
\r
166 test_expect_equal "$output" "thread:0000000000000005 2001-01-05 [1/1] Notmuch Test Suite; encodedword withoutspace (inbox unread)"
\r