[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mailman-developers
Subject:    Re: [Mailman-Developers] Proposal: option for UTF-8 emails without
From:       Petr_HroudnĂ˝ <petr.hroudny () gmail ! com>
Date:       2009-05-15 7:09:51
Message-ID: ab8fc7f50905150009y3ccd24efu6ad319f87f953b59 () mail ! gmail ! com
[Download RAW message or body]

2009/5/15 Barry Warsaw <barry@list.org>:
> > The fix is quite simple and is already widely used by other projects.
> > All that needs to be done is
> > to redefine Python's UTF-8 charset properties, i.e. in every place
> > where you have
> > 
> > from email.Charset import Charset
> > 
> > you need to add:
> > 
> > email.Charset.add_charset('utf-8',email.Charset.SHORTEST, None, None)
> > 
> > With such setting, mailman will keep the 8bit encoding also when it's
> > adding header/footer and won't downconvert to 7bit+base64. So I'd like
> > to propose the above addition, at least as a configurable option
> > if there's any fear that enabling it by default could cause some problems.
> 
> I'll note that you don't need to change Mailman at all do to this.   You
> simply need to add this to your mm_cfg.py file and I'll bet it will just
> work for you.

It works indeed! Just a slightly different syntax needs to be used:

import email.Charset
email.Charset.add_charset('utf-8',email.Charset.SHORTEST, None, None)

It might probably make sense to document this somewhere, or perhaps introduce
a new config option for MM2.2 which will do this. Almost all MTAs today are 8bit
clean, so having an option to work in 8bit mode will surely be
attractive for many.

Thanks, Petr

P.S. I responded to your other comments into bug #373083 notes.
_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/mailman-developers%40progressive-comp.com


Security Policy: http://wiki.list.org/x/QIA9


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic