Bug#1021614: notmuch: RFC2047-encoded special characters in display-name show up unquoted

2022-10-14 Thread Jakub Wilk

Attaching the reprocucer scripts, which somehow got lost in transport!?

--
Jakub Wilk
#!/bin/bash
set -e -u
tmpdir="$(mktemp -d)"
export NOTMUCH_DATABASE="$tmpdir"
notmuch --config '' new > /dev/null
mkdir -p "$NOTMUCH_DATABASE"/{cur,new,tmp}
notmuch --config '' insert > /dev/null
notmuch --config '' show '*' | grep ^From:
rm -rf "tmpdir"
#!/usr/bin/python3

import sys

import gi
gi.require_version('GMime', '3.0')
from gi.repository import GMime
GMime.init()

stream = GMime.StreamPipe.new(sys.stdin.fileno())
parser = GMime.Parser.new_with_stream(stream)
msg = parser.construct_message()
addrs = msg.get_from()
addrs = addrs.to_string(GMime.FormatOptions(), True)
print('From:', addrs)
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Bug#1021614: notmuch: RFC2047-encoded special characters in display-name show up unquoted

2022-10-14 Thread Jakub Wilk

Package: notmuch
Version: 0.37-1

The attached message has a bunch of RFC-2047-encoded special characters 
in the display-name part of the From field:


   $ grep ^From: weird-from.eml
   From: =?UTF-8?Q?=3Cfoo=40example.org=3E=2C?= 

When you show this message in notmuch, the special characters show up 
unquoted (and unencoded), so that it looks like there are two addresses 
in the From field:


   $ ./notmuch-show-from < weird-from.eml
   From: , 

I initially thought this is a GMime bug, but it seems GMime gets this 
right:


   $ ./gmime-show-from < weird-from.eml
   From: "," 


-- System Information:
Architecture: i386

Versions of packages notmuch depends on:
ii  libnotmuch5 0.37-1
ii  libc6   2.35-3
ii  libglib2.0-02.74.0-2
ii  libgmime-3.0-0  3.2.13+dfsg-2
ii  libtalloc2  2.3.4-1
ii  zlib1g  1:1.2.11.dfsg-4.1

--
Jakub Wilk
--- Begin Message ---
--- End Message ---
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org