Patches item #955819, was opened at 2004-05-18 11:14
Message generated for change (Comment added) made by tkikuchi
You can respond by visiting:Þtail&atid00103&aid•5819&group_id3

Category: mail delivery
Group: Mailman 2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: K?roly Segesdi (vm303)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix: [ 926034 ] Crashes on encoding errors

Initial Comment:
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
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:

--- 2003-03-30 22:39:05.000000000 +0200
+++ 2004-05-18 12:01:35.000000000 +0200
@@ -284,7 +284,7 @@
outcodec charset.output_codec or 'us-ascii'
s = s.encode(outcodec, errors)
- except UnicodeError:
+ except (UnicodeError, LookupError):
assert False, 'utf-8 conversion

this way if s.encode does not understand the original
encoding (like windows-1250 or windows-1252) then it
resorts to use utf-8

Comment By: Tokio Kikuchi (tkikuchi)
Date: 2004-11-14 11:26

Logged In: YES

This patch is for email package which belongs to Python
language distribution. Please submit this report to the
Python patch/bug tracker.


You can respond by visiting:Þtail&atid00103&aid•5819&group_id3

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-coders @
postedNov 14, '04 at 12:26p
activeNov 14, '04 at 12:26p

1 user in discussion 1 post



site design / logo © 2022 Grokbase