1 Return-Path: <wking@tremily.us>
\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 1836C431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 08:52:26 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5
\r
13 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id T+LxNMX5f3Fs for <notmuch@notmuchmail.org>;
\r
18 Fri, 14 Feb 2014 08:52:20 -0800 (PST)
\r
19 Received: from qmta02.westchester.pa.mail.comcast.net
\r
20 (qmta02.westchester.pa.mail.comcast.net [76.96.62.24])
\r
21 by olra.theworths.org (Postfix) with ESMTP id 655ED431FBD
\r
22 for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 08:52:13 -0800 (PST)
\r
23 Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87])
\r
24 by qmta02.westchester.pa.mail.comcast.net with comcast
\r
25 id SGFo1n0011swQuc51GsDum; Fri, 14 Feb 2014 16:52:13 +0000
\r
26 Received: from odin.tremily.us ([24.18.63.50])
\r
27 by omta15.westchester.pa.mail.comcast.net with comcast
\r
28 id SGqC1n00R152l3L3bGqDSb; Fri, 14 Feb 2014 16:50:13 +0000
\r
29 Received: from mjolnir.tremily.us (unknown [192.168.0.140])
\r
30 by odin.tremily.us (Postfix) with ESMTPS id 51CF6103A9A4;
\r
31 Fri, 14 Feb 2014 08:50:12 -0800 (PST)
\r
32 Received: (nullmailer pid 18388 invoked by uid 1000);
\r
33 Fri, 14 Feb 2014 16:48:57 -0000
\r
34 From: "W. Trevor King" <wking@tremily.us>
\r
35 To: notmuch@notmuchmail.org
\r
36 Subject: [PATCH v4 3/4] nmbug-status: Encode output using the user's locale
\r
37 Date: Fri, 14 Feb 2014 08:48:54 -0800
\r
39 <bb5b8633b53da73382fef09c7fa35bde95c0738b.1392395932.git.wking@tremily.us>
\r
40 X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1
\r
41 In-Reply-To: <cover.1392395932.git.wking@tremily.us>
\r
42 References: <cover.1392395932.git.wking@tremily.us>
\r
43 In-Reply-To: <cover.1392395932.git.wking@tremily.us>
\r
44 References: <cover.1392395932.git.wking@tremily.us>
\r
45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
\r
46 s=q20121106; t=1392396733;
\r
47 bh=LTXTVJ2Zy7/0quX/ecDWSzs3ksPc1HfCMrrf2wLtn3Y=;
\r
48 h=Received:Received:Received:Received:From:To:Subject:Date:
\r
50 b=JVl6m2X/18QZZJ55lWhA2GvJ/h0gE3W91wfrjcYxobEtReqrDm/VuYSk5XknRu/aY
\r
51 kzm1MloUq87mHwLrIWVFMiHvzCjGQdEVE2Lwf9SOb2LQ4EcqeWGxJznmoPE8RrR3jR
\r
52 cbIh4+Yo5Y9HWiq5bsbfCD38xRy12LT/zcLkV654i9cHOIx6OBkn/o5Hh8g8OwlxSE
\r
53 xdbHwOBKJ2ANkDPUep3W9Y7Oj6XzJTzHHMqf4cIPEZkUW1tO+G0Qu8lalK7wFAocl9
\r
54 8l06dWyctkMJWSKSRyS5bRu4UcylGbZpv7ZQqxoKeccyYrOeIQxAgH23ssKh43/ejy
\r
56 Cc: Tomi Ollila <tomi.ollila@iki.fi>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Fri, 14 Feb 2014 16:52:26 -0000
\r
71 Instead of always writing UTF-8, allow the user to configure the
\r
72 output encoding using their locale. This is useful for previewing
\r
73 output in the terminal, for poor souls that don't use UTF-8 locales
\r
76 devel/nmbug/nmbug-status | 5 +++--
\r
77 1 file changed, 3 insertions(+), 2 deletions(-)
\r
79 diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
\r
80 index 018f191..c4532f1 100755
\r
81 --- a/devel/nmbug/nmbug-status
\r
82 +++ b/devel/nmbug/nmbug-status
\r
83 @@ -90,7 +90,7 @@ class Page (object):
\r
84 byte_stream = sys.stdout.buffer
\r
85 except AttributeError: # Python 2
\r
86 byte_stream = sys.stdout
\r
87 - stream = codecs.getwriter(encoding='UTF-8')(stream=byte_stream)
\r
88 + stream = codecs.getwriter(encoding=_ENCODING)(stream=byte_stream)
\r
89 self._write_header(views=views, stream=stream)
\r
91 self._write_view(database=database, view=view, stream=stream)
\r
92 @@ -249,7 +249,7 @@ _PAGES['html'] = HtmlPage(
\r
93 header='''<!DOCTYPE html>
\r
96 - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
97 + <meta http-equiv="Content-Type" content="text/html; charset={encoding}" />
\r
98 <title>Notmuch Patches</title>
\r
99 <style media="screen" type="text/css">
\r
101 @@ -293,6 +293,7 @@ For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>
\r
104 '''.format(date=datetime.datetime.utcnow().date(),
\r
105 + encoding=_ENCODING,
\r
106 inter_message_padding='0.25em',
\r
107 border_radius='0.5em'),
\r
108 footer='</body>\n</html>\n',
\r