fix: [ 926034 ] Crashes on encoding errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
New
|
Undecided
|
Unassigned |
Bug Description
Actually the bug title is wrong, the problem is (I
think) python not supporting windows-1250 and windows-1252.
The problem can be fixed in the email library in
$MAILMANDIR/
I don't know if newer pythons (afaik python 2.3
contains this email package and maybe it does handle
windows codepages) still suffer the same problem.
So here's my solution for mailman-2.1.3 (I think it's
applicable to 2.1.4 too) and python 2.2.2:
--- Header.py.orig 2003-03-30 22:39:05.000000000 +0200
+++ Header.py 2004-05-18 12:01:35.000000000 +0200
@@ -284,7 +284,7 @@
charset.
- except UnicodeError:
+ except (UnicodeError, LookupError):
failed'
this way if s.encode does not understand the original
encoding (like windows-1250 or windows-1252) then it
resorts to use utf-8
The file mailman- subject- bugfix. patch was added: patch for the email library