email.get_filename() with newline

Thomas Guettler hv at tbz-pariv.de
Fri Nov 9 08:46:15 EST 2007


Hi,

if I use part.get_filename() with the following email part:

------_=_NextPart_001_01C81B11.52AB8006
Content-Type: application/vnd.ms-excel;
	name="=?iso-8859-1?Q?30102007=28aktualisiert=29=5FK=FCndigungen_enviaM=5FErdgas?=
	=?iso-8859-1?Q?_S=FCds__GmbH=2Exls?="
Content-Disposition: attachment;
	filename="=?iso-8859-1?Q?30102007=28aktualisiert=29=5FK=FCndigungen_enviaM=5FErdgas?=
	=?iso-8859-1?Q?_S=FCds__GmbH=2Exls?="
Content-Description: =?iso-8859-1?Q?30102007=28aktualisiert=29=5FK=FCndigungen_enviaM=5FErdgas?=
	=?iso-8859-1?Q?_S=FCds__GmbH=2Exls?=
Content-Transfer-Encoding: base64

0M8R4KGxGu...

I get a filename which includes a newline character and the ?iso... encoding
is not resolved. But the mail user agent "mutt" does display the filename
correct. I tried it with the latest email packages (4.0.2).

Any hints how to parse this filename?

 Thomas



More information about the Python-list mailing list