From:
[email protected]
Lars Wirzenius wrote:
Perhaps I should separate the subject encoding from this patch so that
the word wrap tweaking won't hinder applying the subject encoding (which
is an actual bug).
Yes, I'd rather address these separatly. I've talked about the wrapping
with r2e's author before, and he prefers to leave it to the mail client
to handle the wrapping (which mutt does). It's true that RFC 2646
specifies that the Content-Type should be 'text/plain; format=flowed',
and recommends keeping the lines under 80 characters even with flow
encoded text. I've not followed up on making r2e's use of flowed text
more RFC compliant since it happens to already work well in mutt and
some other clients.
I don't have a test feed handy right now but I think this is the patch
for the 7-bit subject:
Index: debian/changelog ===================================================================
--- debian/changelog (revision 10593)
+++ debian/changelog (working copy)
@@ -1,3 +1,10 @@
+rss2email (1:2.51-6) UNRELEASED; urgency=low
+
+ * Patch from Lars Wirzenius to properly encode the Subject in 7-bit ascii.
+ Closes: #265350
+
+ -- Joey Hess <
[email protected]> Thu, 12 Aug 2004 21:47:44 -0300
+
rss2email (1:2.51-5) unstable; urgency=low
* sendmail comment typo fix. Closes: #259691
Index: rss2email.py ===================================================================
--- rss2email.py (revision 10593)
+++ rss2email.py (working copy)
@@ -103,6 +103,8 @@
if SMTP_SEND: import smtplib; smtpserver = smtplib.SMTP(SMTP_SERVER)
else: smtpserver = None
+from email.Header import Header
+
import feedparser
feedparser.USER_AGENT = "rss2email/"+__version__+ " +
http://www.aaronsw.com/2002/rss2email/"
@@ -127,6 +129,10 @@
"""Quote names in email according to RFC822."""
return '"' + unu(s).replace("\\", "\\\\").replace('"', '\\"') + '"'
+def header7bit(s):
+ """E