<div dir="ltr"><div class="gmail_extra"><br><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="gmail-HOEnZb"><div class="gmail-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="gmail-"><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>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">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">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>