--- Scrubber.py 2006-02-19 13:03:38.000000000 -0800 +++ Scrubber.new.py 2006-11-23 10:34:41.328565700 -0800 @@ -380,6 +380,11 @@ text.append(t) # Now join the text and set the payload sep = _('-------------- next part --------------\n') + try: + s = unicode(sep, lcset, 'replace') + sep = s.encode(charset, 'replace') + except (UnicodeError, LookupError, ValueError): + pass replace_payload_by_text(msg, sep.join(text), charset) return msg