[Email-SIG] Patch: Improve recognition of attachment file name, with encodings
Bill Janssen
janssen at parc.com
Thu Feb 14 02:33:14 CET 2008
> > + # nando: Some messages specify the file name of attachment this way:
> > if filename is missing:
> > + filename = self.get_param('name', missing, 'content-type')
> > + if filename is missing:
> > return failobj
> > + """The following line takes care of cases such as this:
> > +Content-Disposition: attachment;
> > + filename="=?ISO-8859-1?Q?z=C7D-_Zoltan=5Fchunk=5F5.wmv?="
> > + """
> > + filename = decode_header(filename)[0][0]
> > return utils.collapse_rfc2231_value(filename).strip()
>
> I feel your pain; Japanese MUAs do this kind of thing all the time,
> too. However, decoding such garbage should not be done without
> specific permission from a human user, because it's forbidden by the
> standard.
Would it be possible to make this a configurable option, so that if
the user enables it, it's done?
Bill
More information about the Email-SIG
mailing list