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

W. Trevor King wking at tremily.us
Wed Feb 12 18:35:01 PST 2014


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
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

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140212/8e1c104c/attachment.pgp>


More information about the notmuch mailing list