From 964e4407bf7ba91a95c36689ec0e0712dd190938 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 13 Feb 2014 18:35:01 +1600 Subject: [PATCH] Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's locale --- d6/0461fdf15c1ae638202b1cd056ecddef33d9b5 | 153 ++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 d6/0461fdf15c1ae638202b1cd056ecddef33d9b5 diff --git a/d6/0461fdf15c1ae638202b1cd056ecddef33d9b5 b/d6/0461fdf15c1ae638202b1cd056ecddef33d9b5 new file mode 100644 index 000000000..3bc242e4d --- /dev/null +++ b/d6/0461fdf15c1ae638202b1cd056ecddef33d9b5 @@ -0,0 +1,153 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 152C6431FBD + for ; Wed, 12 Feb 2014 18:35:13 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.1 +X-Spam-Level: +X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id LiNgdIxUorIn for ; + Wed, 12 Feb 2014 18:35:05 -0800 (PST) +Received: from qmta06.westchester.pa.mail.comcast.net + (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) + by olra.theworths.org (Postfix) with ESMTP id 5B178431FAE + for ; Wed, 12 Feb 2014 18:35:05 -0800 (PST) +Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73]) + by qmta06.westchester.pa.mail.comcast.net with comcast + id ReUA1n00B1ap0As56eb4D9; Thu, 13 Feb 2014 02:35:04 +0000 +Received: from odin.tremily.us ([24.18.63.50]) + by omta22.westchester.pa.mail.comcast.net with comcast + id Reb21n00l152l3L3ieb3CZ; Thu, 13 Feb 2014 02:35:04 +0000 +Received: by odin.tremily.us (Postfix, from userid 1000) + id 89EC1102CAD8; Wed, 12 Feb 2014 18:35:01 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; + t=1392258901; bh=O+fMGyvTDahKwmjQt8IC88ItFgXolb77gDenG5WZgP8=; + h=Date:From:To:Cc:Subject:References:In-Reply-To; + b=gNPoncWfFIgCBUbiSpGCGv3ECRIoJf45xOZjyGOAvFlasW2mztFFXzUH6KW4bdhyP + Qrry3q/BH/igyx7jIgAtKL05mBkYcIVRkrj4mgUHlrXUjsFFhvh/nHU9gXODOhsP9w + c1rwj1dwo99fCIyJu5MXXkpkRySzUJFWias7pe+c= +Date: Wed, 12 Feb 2014 18:35:01 -0800 +From: "W. Trevor King" +To: David Bremner +Subject: Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's + locale +Message-ID: <20140213023501.GH7538@odin.tremily.us> +References: + + <87eh396e6e.fsf@zancas.localnet> + + <20140211201135.GJ14197@odin.tremily.us> + <8761ol5mvy.fsf@zancas.localnet> + <20140211223336.GM14197@odin.tremily.us> + <877g8z4v4x.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha1; + protocol="application/pgp-signature"; boundary="3VRmKSg17yJg2MZg" +Content-Disposition: inline +In-Reply-To: <877g8z4v4x.fsf@zancas.localnet> +OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; + url=http://tremily.us/pubkey.txt +User-Agent: Mutt/1.5.22 (2013-10-16) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; + s=q20121106; t=1392258904; + bh=E52wqztPGdPxGow5qtxkaudKjWB+qiBOYQ/G8LKh59I=; + h=Received:Received:Received:Date:From:To:Subject:Message-ID: + MIME-Version:Content-Type; + b=NIRRWEHMveklSDgrLhHUYfJggbditgZ0jGt9Scl/dkIOHLXFjANNThFUWf3NG4toq + 5RhfumCnr5S3WAuiVl92PWE93/P/HsGkAhD8yfYhA3AASMLuP7C7ZYOpkBJzLhvppI + TJYGX4zJscEauI7HNrJoTgNXjre6I5vEc85A+dUqK0McIrhZ9M8UOPFawTEiWJJVbF + qtzckPY+7Swu7IobtbKwFdDc2K9un81GoLkXECcZI0IdQp2xo9o065/8GbAQZaW5l3 + a9pfkkPVcNKWpa7pTAGNt5zARyhF14RtMH06zd9xn9BSlb4HCdGdg94XT7hrgNCNz5 + EWPTghyPIlGEg== +Cc: Tomi Ollila , notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 13 Feb 2014 02:35:13 -0000 + + +--3VRmKSg17yJg2MZg +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable + +On Wed, Feb 12, 2014 at 10:13:50PM -0400, David Bremner wrote: +> W. Trevor King writes: +> > I don't understand why your choice of LANG should depend on the +> > interactive-ness of an invocation. +>=20 +> It's not the choice of LANG, but rather the acceptability of +> crashing with an unhandled exception. + +I'd be fine with catching the exception and dying with a more compact +error message. The script would still be dying though. + +> > The upside of a configurable language is that the user gets output +> > in their preferred encoding (UTF-8 or not) and=E2=80=94with a bit of +> > additional gettext work=E2=80=94in their preferred language. That soun= +ds +> > like a fair trade to me. +>=20 +> The downside is that it introduces another error condition into the +> script. The data from notmuch is unicode; conversion to most non-utf8 +> locales is lossy and can cause crashes. + +Folks on Microsoft OSes might prefer UTF-16 [1], which is a valid +preference. + +> That's why I don't like the idea of enabling it without some +> explicit option or configuration choice. + +I think LANG is an explicit configuration choice ;). I'm fine punting +on this though, since UTF-8 works for me. Should I rebase this to the +end of the remaining series and resubmit? Then this patch can cook on +the list until we find a user that doesn't like UTF-8 ;). + +Cheers, +Trevor + +[1]: http://en.wikipedia.org/wiki/Unicode_in_Microsoft_Windows + +--=20 +This email may be signed or encrypted with GnuPG (http://www.gnupg.org). +For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy + +--3VRmKSg17yJg2MZg +Content-Type: application/pgp-signature; name="signature.asc" +Content-Description: OpenPGP digital signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAEBAgAGBQJS/C9TAAoJEKKfehoaNkbtjIMQAIj6jRFTTd+cPF94TvpYqheQ +fVnDzblKg7zDaJ+ZyF8BVJzjh3ryWPqJ1CbWp48AyIB8DFQr9GPltE6bGIJIl54E +jCyD20WzNO2SYQBZO9hoO5FuSEX99n5a8vP+SjCbgk0kCT+GsBypDNflDLbcdhTq +uwCslAFcxQBmc2YkH0eIer8gJmny6kWmtLuFlPKuXiiGqGbRJD77fCNXAMh85wKl +UIbtw+fU0brNIRrnMN7REIL+vJWDAe6if/qyoS1r/Uhotho26a2DElTTCMJuQVEG +pfjyWvL65/Y5XvOd8mObxjDTq5ijkfHvp2ec3l/91EDO8cU/qRJIf6NDCHdeaufk +EIRpt6sU9O26g9gjxgJ1qNv4bJJKWTshgndLRyM8/PL7vitDKXluqJN+qWv+RtTU +/ZSNE0aiqaKnVD10WH29JTFxLghqBvRzetz0ACp5/aY6q3MLX9kVh0k5yCvtPckn +I2SjcFGq25G7fHtlDkQ0HVHD/WRahaGRkKm2alpSdWzFRaLp4s47j4Mcp2rlzv+x +8CBlImof+axYPOEHTZ1ilJy/uZEcVOPNzNzojn1lvqh30d6pjUN9V2R65/+KqYFe +cYyj8P7287WiG1bPusJ4HpXMqymmM4lyZElUJ3TvLS7m0F03obz1f0Uq4h7rWvA7 +jiFmWgmS4pbjg5yvv21U +=oFX0 +-----END PGP SIGNATURE----- + +--3VRmKSg17yJg2MZg-- -- 2.26.2