[Mailman-Developers] [Mailman-checkins] SF.net SVN: mailman: branches/exp-elixir-branch/Mailman/Handlers/ Scrubber.py
msapiro at value.net
Fri May 11 21:02:12 CEST 2007
bwarsaw at users.sourceforge.net wrote:
>Forward port more of Mark's r8204 fixes:
> Fixed a scrubber issue where the i18n translated 'next part' separator
> can be garbled if the list charset is different from the message.
>Note that the other parts of the Scrubber.py and Decorate.py changes in r8204
>have already been applied to the trunk.
>--- branches/exp-elixir-branch/Mailman/Handlers/Scrubber.py 2007-05-10 03:08:48 UTC (rev 8214)
>+++ branches/exp-elixir-branch/Mailman/Handlers/Scrubber.py 2007-05-10 03:59:31 UTC (rev 8215)
>@@ -331,6 +343,13 @@
> # Now join the text and set the payload
> sep = _('-------------- next part --------------\n')
>+ # The i18n separator is in the list's charset. Coerce it to the
>+ # message charset.
>+ s = unicode(sep, lcset, 'replace')
>+ sep = s.encode(charset, 'replace')
>+ except (UnicodeError, LookupError, ValueError):
> rept = sep.join(text)
> # Replace entire message with text and scrubbed notice.
> # Try with message charsets and utf-8
I'm not sure the above patch is necessary (or even correct) in the
trunk. I looked at Tokio's port of my Scrubber.py changes to the
trunk. and it looked to me that Tokio had accounted for this issue in
a different way.
BTW, I haven't looked at all of Barry's port of my recent patches, but
I also ported them to my working copy of the trunk. I didn't commit
them because although I'm sure they were ported correctly, I wanted to
run a few tests first. Unfortunately, I updated my working copy from
the trunk before starting and then found that the trunk's current
state was not usable for me :-(
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Developers