[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A maze of twisty little python packages, all different

* Henrique de Moraes Holschuh 

| It choked in very surprising and silent ways here when certain charset
| conversions had to take place inside the mailman code.  Even with the high
| amount of traffic we have in utf-8, iso-8859-1 and cp1250 here, it would
| silently miss a delivery once per week.
| Keep a careful eye on your "shunt" directory.  Trying to re-deliver the
| messages that caused trouble would always fail and they would end up in
| "shunt" again.  Switching mailman to a sid-based install fixed the problem.
| I don't exactly recall the error, but I think it caused python to abend
| outside of the mailman code.
| If you are not using a backported python, you will hit the bug sooner or
| later, I am afraid...

It has nothing to do with the python version, I suspect.  Probably
more along the lines of #212643?  The patch below fixes it.

--- mailman-2.1.3.orig/Mailman/Handlers/Scrubber.py
+++ mailman-2.1.3/Mailman/Handlers/Scrubber.py
@@ -308,6 +308,8 @@
                     t = u.encode('ascii', 'replace')
                     # Should use HTML-Escape, or try generalizing to UTF-8
+                    if len(charset) == 0:
+                        charset = 'us-ascii'
                     t = t.encode(charset, 'replace')
                 except (UnicodeError, LookupError):
                     t = t.encode(lcset, 'replace')

Tollef Fog Heen                                                        ,''`.
UNIX is user friendly, it's just picky about who its friends are      : :' :
                                                                      `. `' 

Reply to: