unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Matt Armstrong <marmstrong@google.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: locales and notmuch
Date: Fri, 22 Feb 2019 16:26:31 -0800	[thread overview]
Message-ID: <qf58sy7nydk.fsf@naz.kir.corp.google.com> (raw)
In-Reply-To: <87r2c0ap8v.fsf@tethera.net>

David Bremner <david@tethera.net> writes:

> David Bremner <david@tethera.net> writes:
>
>> Otherwise we could insist they are UTF-8, ignoring the locale. The
>> fullest generality (I think) is to first convert from the users locale
>> to utf8, as in the attached sample program. The gotcha is that the call
>> to setlocale is necessary, and can't really be local to string utility
>> function. So we'd have to add that to notmuch startup. We mostly ignore
>> locales, so I guess there shouldn't be too much side effects; otoh I
>> don't have much experience with locales.
>>
>
> 1) It might be possible to save and restore the locale, although that
> sounds a bit heavy weight for lowercasing a string.
>
> 2) We'd need a UTF-8 locale to test in. I guess C.UTF-8 is not yet
> universally available.

Notmuch should probably adopt a coherent strategy with respect to
character set encodings, rather than do something ad-hoc for the
feature.  Most systems I have worked with normalize to UTF-8 at the
edges and do all work using that encoding.

It is an interesting question: what encoding does .notmuch-config use?
UTF-8?  User's choice?  Similarly, what is the encoding of notmuch's
command line args?

I was just reading https://xapian.org/features and Xapian seems to store
text in UTF-8.  If this is the case, where is the code that does the
charset conversions between the email messages and UTF-8?  How about
between the command line args to UTF-8?

  reply	other threads:[~2019-02-23  0:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 19:11 locales and notmuch David Bremner
2019-02-21 19:57 ` David Bremner
2019-02-23  0:26   ` Matt Armstrong [this message]
2019-02-23 11:43     ` David Bremner
2019-06-19 13:09 ` Daniel Kahn Gillmor
2019-06-19 19:52   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qf58sy7nydk.fsf@naz.kir.corp.google.com \
    --to=marmstrong@google.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).