Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's locale

Subject: Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's locale

Date: Wed, 12 Feb 2014 18:35:01 -0800

To: David Bremner

Cc: Tomi Ollila,

From: W. Trevor King

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.
> 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—with a bit of
> > additional gettext work—in their preferred language.  That sounds
> > like a fair trade to me.
> 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

> 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 ;).



This email may be signed or encrypted with GnuPG (
For more information, see
signature.asc (application/pgp-signature)