Menu

#103 Improve MIME header handling

Mailman 2.1
closed-accepted
nobody
Pipermail (42)
5
2002-06-28
2002-01-29
No

This patch fixes a number of problems for non-English
archives. In particular:

- it normalizes the encoding name (converting to
lower-case, splitting of potential \r characters, and
splitting off potential quotes)

- if the article and the header encoding differ, it tries
to preserve the decoded header as a Unicode string,
instead of immediately falling back to the MIME-encoded
one (if the encoding is not known to Python it will
still fall back)

- if a Unicode string needs to be formatted, it uses
character references for all non-ASCII characters.

Discussion

  • Martin v. Löwis

     
  • Martin v. Löwis

    Logged In: YES
    user_id=21627

    The second version of this patch expects and ignores
    LookupError from unicode(), and it decodes the subjects from
    the next and previous articles.

     
  • Martin v. Löwis

    Second version

     
  • Karsten Dambekalns

    Logged In: YES
    user_id=105527

    I tried to apply this patch to mailman 2.0.8 and 2.0.9, and
    both times the patch didn't apply cleanly. In fact 6 out of
    10 hunks failed here. Any hints on that? For which version
    was the patch created?

     
  • Martin v. Löwis

    Logged In: YES
    user_id=21627

    The patch applies to version 2.13 of HyperArch.py, just as
    the patch header says.

    It was current for the mailman CVS at the time of its
    creation. It has been applied to the mailman CVS by now (as
    2.14), so
    it is now useless. Feel free to back-port it to mailman
    2.0.8 if you want.

     
  • Karsten Dambekalns

    Logged In: YES
    user_id=105527

    Ok, I could have had a look at the patch header more
    closely, sorry. Thanks for your answer though, I wasn't
    aware of 2.14 being existent at all, since 2.0.9 seems to be
    the latest version being officially avilable...

    Anyway, my problem with german Umlauts being screwed up was
    solved by running arch manually, somehow the Umlauts seems
    to be only messed up when the archiver is run automatically...

    And rather than backporting (especially now, since my
    special problem was solved so easily ;) I would love to see
    a newer version of mailman being released officially...

    Thanks again for you answer!

     
  • Barry Warsaw

    Barry Warsaw - 2002-06-28

    Logged In: YES
    user_id=12800

    k-fish, Martin was actually referring to the revision of one
    of the files in the Mailman 2.1 distribution. MM2.1 is in
    beta testing now and will officially support
    internationalization. The MM2.0.x does not.

    I'm closing this patch since as Martin says, it's already
    applied!

     
  • Barry Warsaw

    Barry Warsaw - 2002-06-28
    • milestone: --> Mailman 2.1
    • status: open --> closed-accepted
     
  • Karsten Dambekalns

    Logged In: YES
    user_id=105527

    Thanks, now this is clear. I'll try the beta ASAP :-)

     

Log in to post a comment.