This is in preparation of switching to gmime header parsing, but arguably converting tabs to spaces rather than question marks is the right thing to do anyway. --- notmuch-search.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notmuch-search.c b/notmuch-search.c index d9d39ec..eab314f 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -40,7 +40,9 @@ sanitize_string (const void *ctx, const char *str) loop = out = talloc_strdup (ctx, str); for (; *loop; loop++) { - if ((unsigned char)(*loop) < 32) + if (*loop == '\t') + *loop = ' '; + else if ((unsigned char)(*loop) < 32) *loop = '?'; } return out; -- 1.8.4.rc3