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 18745431FBF
\r
6 for <notmuch@notmuchmail.org>; Tue, 11 Feb 2014 12:11:48 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id Z+rQvOqzTqoa for <notmuch@notmuchmail.org>;
\r
17 Tue, 11 Feb 2014 12:11:40 -0800 (PST)
\r
18 Received: from qmta09.westchester.pa.mail.comcast.net
\r
19 (qmta09.westchester.pa.mail.comcast.net [76.96.62.96])
\r
20 by olra.theworths.org (Postfix) with ESMTP id E0E70431FBD
\r
21 for <notmuch@notmuchmail.org>; Tue, 11 Feb 2014 12:11:39 -0800 (PST)
\r
22 Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36])
\r
23 by qmta09.westchester.pa.mail.comcast.net with comcast
\r
24 id R3cu1n0020mv7h0598Beaj; Tue, 11 Feb 2014 20:11:38 +0000
\r
25 Received: from odin.tremily.us ([24.18.63.50])
\r
26 by omta11.westchester.pa.mail.comcast.net with comcast
\r
27 id R8Bc1n00k152l3L3X8Bdmh; Tue, 11 Feb 2014 20:11:38 +0000
\r
28 Received: by odin.tremily.us (Postfix, from userid 1000)
\r
29 id A59BB1020F20; Tue, 11 Feb 2014 12:11:35 -0800 (PST)
\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;
\r
31 t=1392149495; bh=xBZ6+21TpuRhhbLqQcsAptAZO1YbnTJnUMbygvjEq34=;
\r
32 h=Date:From:To:Cc:Subject:References:In-Reply-To;
\r
33 b=Y5JsVfbcudqU/zN63j5HI4OEWRhYMo7FuSaD+aw2CaSyxYJL4MBl9LLRZQckiefH9
\r
34 24qh8pKe8cU6oHTq8BG/o8cPOEiKzAO5R1DaPpD3uEGdhpJyHWsC8EewCnXm1rX2Zx
\r
35 Zx9GKQfrheneBijLSVecws43yVJD/tniRMahFIvo=
\r
36 Date: Tue, 11 Feb 2014 12:11:35 -0800
\r
37 From: "W. Trevor King" <wking@tremily.us>
\r
38 To: Tomi Ollila <tomi.ollila@iki.fi>
\r
39 Subject: Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's
\r
41 Message-ID: <20140211201135.GJ14197@odin.tremily.us>
\r
42 References: <cover.1392056624.git.wking@tremily.us>
\r
43 <deff072f78f4a7c5b0774e67a8f0517cc704725d.1392056624.git.wking@tremily.us>
\r
44 <87eh396e6e.fsf@zancas.localnet>
\r
45 <m2sirpu46i.fsf@guru.guru-group.fi>
\r
47 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
48 protocol="application/pgp-signature"; boundary="MR4jz7xdnY3JMfbc"
\r
49 Content-Disposition: inline
\r
50 In-Reply-To: <m2sirpu46i.fsf@guru.guru-group.fi>
\r
51 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;
\r
52 url=http://tremily.us/pubkey.txt
\r
53 User-Agent: Mutt/1.5.22 (2013-10-16)
\r
54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
\r
55 s=q20121106; t=1392149498;
\r
56 bh=01X+Pt8TM2BiDeu/MUSHZEpOVOy+c896RrQRkcgwF1A=;
\r
57 h=Received:Received:Received:Date:From:To:Subject:Message-ID:
\r
58 MIME-Version:Content-Type;
\r
59 b=r1/xfPiy1uIp5rL3GMCvvxCjsuxiyk2SSmSQ/mBvpz/SGXhA8YvAtXjAfP/t0KreP
\r
60 xWz+07dUuOq2IyslTKAbxKA72VWFZbijoIpoozekM7SW9tlgJ8z9vpOyapsYNj5GAk
\r
61 TtZRxO1vLZwTwMVN7maFSK/jK6NGvYjSL2zLq/7ZsBfmre1SRRZCkIDc/s95rK92FQ
\r
62 2eLxaJ1ZWrKdp2vY8xrbt6j9gfakegBZyOAw4kXrN6sQwPQbAEqkYLWYJcFkK7uRSi
\r
63 iIoSlXTRznNXwhsAivJkpXB5MjkeCe8UzUTLV+6iYqW/9U9BIIje5425Z0fYHfardv
\r
65 Cc: notmuch@notmuchmail.org
\r
66 X-BeenThere: notmuch@notmuchmail.org
\r
67 X-Mailman-Version: 2.1.13
\r
69 List-Id: "Use and development of the notmuch mail system."
\r
70 <notmuch.notmuchmail.org>
\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
74 List-Post: <mailto:notmuch@notmuchmail.org>
\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
77 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
78 X-List-Received-Date: Tue, 11 Feb 2014 20:11:48 -0000
\r
82 Content-Type: text/plain; charset=utf-8
\r
83 Content-Disposition: inline
\r
84 Content-Transfer-Encoding: quoted-printable
\r
86 On Tue, Feb 11, 2014 at 04:14:45PM +0200, Tomi Ollila wrote:
\r
87 > On Tue, Feb 11 2014, David Bremner wrote:
\r
88 > > W. Trevor King writes:
\r
89 > >> Instead of always writing UTF-8, allow the user to configure the
\r
90 > >> output encoding using their locale. This is useful for
\r
91 > >> previewing output in the terminal, for poor souls that don't use
\r
92 > >> UTF-8 locales ;).
\r
95 > > remote: UnicodeEncodeError: 'ascii' codec can't encode character
\r
96 > > u'\u017b' in position 219: ordinal not in range(128)
\r
98 > > possibly because of
\r
103 > > I think it's fine to _allow_ the user to configure the output
\r
104 > > encoding. I'm less sure about _requiring_ it.
\r
106 If a user has set LANG=3DC, I expect that's what we should use for
\r
107 output (in which case dying with an encoding error is the right thing
\r
108 to do). If you want UTF-8 output, using a UTF-8 locale seems like a
\r
109 reasonable requirement. For the HTML case, we could fall back on
\r
110 numerical character references (e.g. Ż) if the requested locale
\r
111 didn't support the required character directly, but I don't see an
\r
112 easy solution for the text-mode output.
\r
114 > That reminded me that yesterday (after review, of course) I thought
\r
115 > that we probably want configuration file to be parsed as utf-8
\r
116 > instead of any encoding user may have in their system...
\r
118 The POSIX spec for LANG doesn't restrict the scoping to the terminal
\r
119 intput / output [1], so I feel like we should also be using LANG to
\r
120 read the config file as well. I expect folks with UTF-8 LANGs will
\r
121 want UTF-8 file contents. In both cases (terminal output and
\r
122 config-file input), it is easy for users to pick their preferred
\r
125 $ LANG=3Den_US.UTF-8 nmbug-status =E2=80=A6
\r
127 I think we should trust what they've chosen, rather than guessing that
\r
128 they actually want UTF-8 ;).
\r
133 [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.htm=
\r
137 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
\r
138 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
\r
141 Content-Type: application/pgp-signature; name="signature.asc"
\r
142 Content-Description: OpenPGP digital signature
\r
144 -----BEGIN PGP SIGNATURE-----
\r
145 Version: GnuPG v2.0.22 (GNU/Linux)
\r
147 iQIcBAEBAgAGBQJS+oP0AAoJEKKfehoaNkbt6ZAP/0H+pnE5bI6Fr1nukjMFq93W
\r
148 OzbHgIHma+iXHjW4++gid1C1upuDVqZ7n4OkMzRf4sLoh9YRnNIvTaoYyiNUlceN
\r
149 tiNOzTSNI5r/AJpQKP1pOQIySRMNPbBAvxbEHoL7FhQyOOvPlDR2wuLJw0Scg577
\r
150 6bksYfSiOoxYYPfNb/Nt0PUYBAL3BWgNyH/47DPdqANgZK7OhY2KuzEwBiBChE4l
\r
151 cW81OlnqiczYPmSfxLjxLHDyJIgDZh7AN++UgXndLtoUy1xF31pIoJFF5KMdF5EU
\r
152 SaI3zWqrqA4CzZEWUIzTo6VwqCJj3AMzaGN02R/jUrcunfgmSsjoqiPyLGaoU9xr
\r
153 eFhFUuPTWr9jPqevaPmutUaj2mp2KfSPzv4ImJCsQZIdO/L91ZCVlzt7nVRxOpp4
\r
154 l50gfHFP0BGiGwFqP+obZIEvTisJII1bIIIvQvVXKdOHIi0aOcrNzrlvS6VCy3E+
\r
155 P2zxj/PMPApvXisuMybDhpjYrogxwyYREdCpgd3601VXHXVIFicVEgiy5g0AfhIv
\r
156 1U0l4xUpgcahbf7gNFTV+NigxHBXvJXBGSnAelu5mTACY6TeK6Sw0uDfsb0QzwXS
\r
157 8XlcR4tol6Sv8+tsgbTaSXiX3LtWDT6BSsq7+cTRVwD/9oebNsgPwK/GrNuCkAEs
\r
158 fGIcff1XpR4iPmygM/xn
\r
160 -----END PGP SIGNATURE-----
\r
162 --MR4jz7xdnY3JMfbc--
\r