<p dir="ltr">Comparing with the Haskell based notmuch-web, while slightly slower to render a browser page with the same search terms as nmweb, I can view the email which causes nmweb to throw the encoding exception just fine in it. I guess something in that implementation is able to handle encoding differently.<br>
Regards,<br>
Matt </p>
<br><div class="gmail_quote"><div dir="ltr">On Tue, 31 Oct 2017, 21:32 Matthew Lear, <<a href="mailto:matt@bubblegen.co.uk">matt@bubblegen.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 31, 2017 at 7:21 PM, Brian Sniffen <span dir="ltr"><<a href="mailto:bts@evenmere.org" target="_blank">bts@evenmere.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_1982525399679038697gmail-HOEnZb"><div class="m_1982525399679038697gmail-h5"><br>
> I'm no Python expert, but from a quick google it would seem like the cause<br>
> of such an exception is related to not using utf-8.<br>
<br>
</div></div>Neat. So to get there, this has to be a text/html part. It has to have<br>
been decoded, either with the declared content type or with ascii. If a<br>
\u201c (left double quote) showed up, it didn't get decoded as<br>
ascii---and indeed, it looks like the content-type specifies latin-1.<br>
But now when we try to encode back, using the same latin-1, it fails?<br>
That's really neat.<br>
<span class="m_1982525399679038697gmail-"><br>
> Brian - do you think something needs modifying in nmweb.py to cater for<br>
> this type of thing, or is this somehow related my own mailstore (not sure<br>
> why that would be as my messages haven't been modified).<br>
<br>
</span>Lots of mail has busted encoding. I've done some defensive work against<br>
that---look at decodeAnyway and shed a tear for purity---but clearly not<br>
enough. Can you send me a message that causes the problem?<br></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I'll need to fix up the text in the message because it's confidential. That should be easy enough to do.</div><div>I'll send it to you once I've done that.</div><div><br></div><div>One other thing - it looks like accessing attachments should work, but I've seen messages in my local set up here which have attachments shown, but I've not been able to retrieve them.</div><div>Not sure what would cause that. Also some messages which are tagged as having attachments, don't have them shown by nmweb.</div><div><br></div><div>FWIW this link (<a href="https://nmweb.evenmere.org/show/CACMMjMLecmXopb8AATjE3UuCnNLOO%2B5Nmev5X8K-UostDEUdrQ%40mail.gmail.com" target="_blank">https://nmweb.evenmere.org/show/CACMMjMLecmXopb8AATjE3UuCnNLOO%2B5Nmev5X8K-UostDEUdrQ%40mail.gmail.com</a>) has the tag attachment applied to the message, but there is no attachment shown. And another (<a href="https://nmweb.evenmere.org/show/87d31artti.fsf%40inf-8657.int-evry.fr" target="_blank">https://nmweb.evenmere.org/show/87d31artti.fsf%40inf-8657.int-evry.fr</a>).</div><div><br></div><div>Maybe text/plain only emails are the ones which aren't problematic w.r.t. having their attachments shown?</div><div>Cheers,</div><div>-- Matt</div><div><br></div></div><br></div></div>
</blockquote></div>