Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's locale
[notmuch-archives.git] / cb / 1b044c288abe868c7c382f1224d7e05e128aa4
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 177F3431FBF\r
6         for <notmuch@notmuchmail.org>; Tue, 11 Feb 2014 14:33:48 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.1\r
10 X-Spam-Level: \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 2tfjARTBlQSs for <notmuch@notmuchmail.org>;\r
17         Tue, 11 Feb 2014 14:33:40 -0800 (PST)\r
18 Received: from qmta13.westchester.pa.mail.comcast.net\r
19         (qmta13.westchester.pa.mail.comcast.net [76.96.59.243])\r
20         by olra.theworths.org (Postfix) with ESMTP id 3652F431FBD\r
21         for <notmuch@notmuchmail.org>; Tue, 11 Feb 2014 14:33:40 -0800 (PST)\r
22 Received: from omta24.westchester.pa.mail.comcast.net ([76.96.62.76])\r
23         by qmta13.westchester.pa.mail.comcast.net with comcast\r
24         id R46Y1n0051ei1Bg5DAZfiq; Tue, 11 Feb 2014 22:33:39 +0000\r
25 Received: from odin.tremily.us ([24.18.63.50])\r
26         by omta24.westchester.pa.mail.comcast.net with comcast\r
27         id RAZd1n00K152l3L3kAZeHB; Tue, 11 Feb 2014 22:33:39 +0000\r
28 Received: by odin.tremily.us (Postfix, from userid 1000)\r
29         id F31BC10218BE; Tue, 11 Feb 2014 14:33:36 -0800 (PST)\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
31         t=1392158016; bh=QVRSNDEqVEYyVzbOXaI1V+mCPxFJ9Hy3dUcWxJg9o2Y=;\r
32         h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
33         b=ABfkO+nJ/A9MjLNjfxUYKZ9SJXkS5vSe4FC3cNA+zj1FzVKqStw69ezHaQ0+Of/cj\r
34         C+TZvwQQOikukqCE0a5SNfYOUH4OjLR9EVbL6pwVAvbAyTcQzAy3s6N1l1hJP91EnC\r
35         LOj39z9KhTq4Nq8z8NpkhQ2teRjmDvn7bhUCeX3g=\r
36 Date: Tue, 11 Feb 2014 14:33:36 -0800\r
37 From: "W. Trevor King" <wking@tremily.us>\r
38 To: David Bremner <david@tethera.net>\r
39 Subject: Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's\r
40         locale\r
41 Message-ID: <20140211223336.GM14197@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
46         <20140211201135.GJ14197@odin.tremily.us>\r
47         <8761ol5mvy.fsf@zancas.localnet>\r
48 MIME-Version: 1.0\r
49 Content-Type: multipart/signed; micalg=pgp-sha1;\r
50         protocol="application/pgp-signature"; boundary="Mt8WfjNhzzoZdE/e"\r
51 Content-Disposition: inline\r
52 In-Reply-To: <8761ol5mvy.fsf@zancas.localnet>\r
53 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
54         url=http://tremily.us/pubkey.txt\r
55 User-Agent: Mutt/1.5.22 (2013-10-16)\r
56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
57         s=q20121106; t=1392158019;\r
58         bh=lf6LhFtSg4ZvqpuCw9MB5JlFNsPsqUDDW2zEHB87Sf4=;\r
59         h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
60         MIME-Version:Content-Type;\r
61         b=qTuhkR9GMK0BlDKdBI60lOr57SVkloJexxiWdNdr9SC6zNvu1RIYdS81S087gMQJY\r
62         GuzXQb/AbSzh+MH/dulm8pajAHMrFMJJDLAezCsu7EY0jHquGeRIaZaZEEqjmFD1Ps\r
63         yGtu1/n4DO31cBVCncMJLGTyw6rjgZh5WErYROp+FVfCD/0nolNJQnF7axvO9bGYsj\r
64         EFEqhexTtYpQ2GxxA2fSA+6tF0HIfSeZ8ANe7J80mruLBjpU7Zn2/HjswGBM0RH6Ur\r
65         J4B+0VcPO3lW7bJNR5y3kvvaGqAS22Mz1ddd5MPwgxzT4rmHkBlA5fI2mEF1YCb9IE\r
66         eAkX6edmHbF+g==\r
67 Cc: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
68 X-BeenThere: notmuch@notmuchmail.org\r
69 X-Mailman-Version: 2.1.13\r
70 Precedence: list\r
71 List-Id: "Use and development of the notmuch mail system."\r
72         <notmuch.notmuchmail.org>\r
73 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
75 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
76 List-Post: <mailto:notmuch@notmuchmail.org>\r
77 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
78 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
79         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
80 X-List-Received-Date: Tue, 11 Feb 2014 22:33:48 -0000\r
81 \r
82 \r
83 --Mt8WfjNhzzoZdE/e\r
84 Content-Type: text/plain; charset=utf-8\r
85 Content-Disposition: inline\r
86 Content-Transfer-Encoding: quoted-printable\r
87 \r
88 On Tue, Feb 11, 2014 at 06:02:09PM -0400, David Bremner wrote:\r
89 > W. Trevor King writes:\r
90 > > If a user has set LANG=3DC, I expect that's what we should use for\r
91 > > output (in which case dying with an encoding error is the right\r
92 > > thing to do).\r
93 >=20\r
94 > Perhaps for an interactive tool, intended mainly to be run in a\r
95 > terminal.\r
96 \r
97 I don't understand why your choice of LANG should depend on the\r
98 interactive-ness of an invocation.\r
99 \r
100 > I'm not sure how important the interactive use case is, but I don't\r
101 > want to make nmbug-status less robust in order to conform to some\r
102 > abstract ideal.\r
103 \r
104 Changing from a hard-coded version that matches your preferences to a\r
105 configurable version that respects LANG may require a bit more care on\r
106 the user side (they have to ensure LANG is set in their crontab,\r
107 etc.).  However, setting your locale to match your preferences is not\r
108 that much work.  For example:\r
109 \r
110   export LANG=3Den_US.UTF-8\r
111 \r
112 and you're done.  The upside of a configurable language is that the\r
113 user gets output in their preferred encoding (UTF-8 or not) and=E2=80=94wit=\r
114 h a\r
115 bit of additional gettext work=E2=80=94in their preferred language.  That\r
116 sounds like a fair trade to me.\r
117 \r
118 Cheers,\r
119 Trevor\r
120 \r
121 --=20\r
122 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
123 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
124 \r
125 --Mt8WfjNhzzoZdE/e\r
126 Content-Type: application/pgp-signature; name="signature.asc"\r
127 Content-Description: OpenPGP digital signature\r
128 \r
129 -----BEGIN PGP SIGNATURE-----\r
130 Version: GnuPG v2.0.22 (GNU/Linux)\r
131 \r
132 iQIcBAEBAgAGBQJS+qTIAAoJEKKfehoaNkbtmvwQAJRC6tIGjtYvFsPL07CwSnH9\r
133 BcnxVoFknsRNPDUH114NS40ZhFzAWxpfJHv6G6hPZ8WQQ7lGeEZF/70xF/5CUGF2\r
134 +RpbBWKjzv38qJ5UErKDhu8KBxtJj5l7L+Ju4blygpS7b5rMxKHVqJ4Ut1chFeAL\r
135 rXT/467jGbKAxuctIk5eSpYRXftV2LjIpyn1I/XaWujN8MSyRbXKTdB8QepDZ5Iq\r
136 pfRUpogn1R4xi+3W6yVxo5HwzehP+ZBWtHs+7N/9g6RVweCKOiR18YFRk2oDJue6\r
137 kMHsh+44isnXTNPK01djdVLA27NPNClbdewKOFSrs9f3TXDzJbSo2/vsfvf3v4o+\r
138 s/st7J5cjqlMaMLkJ5DI7io80guFUqJvc0UWixDcIn8l128SNjBD67WA1GIg2LS3\r
139 0wA/9afrGepasSVFlx4st5+wZ4FpBctwyvop6+KkrjOO42NG/OZuy2pVYtJOr8Hj\r
140 eaZaIU9j4xDhhJr6HIMgvyPaQiVSUsfXAwD3RTALCk1nJsEbloKSEEOBIUQBkORV\r
141 m819LFrEKFi7NuL6RMNYC9hYa/MyWLrovUmnfuyvCFmbTF1lqfaUYclzwjpxw5y8\r
142 Tny8XjDNyOjH3Y1YcxB0IiPA5nK/ts32IfW+zJ9KcB+ko30gsSP4pK0bRah/Xieb\r
143 wSYiolBOJOyoWkpVK1KH\r
144 =04Es\r
145 -----END PGP SIGNATURE-----\r
146 \r
147 --Mt8WfjNhzzoZdE/e--\r