Opened 14 years ago

Closed 14 years ago

#177 closed defect (fixed)

Problem parsing Attachment Filename

Reported by: obwandner@… Owned by: bas
Priority: major Milestone: Version 1.2
Component: email2trac Version: trunk
Keywords: Cc:


After Fetching a Mail, with email2trac we have sometimes following Problem with the filename of the attachments:

=?iso-8859-1?Q?Erl=E4uterung=2Epdf?= should by named as Erläuterung.pdf

Mail send by MS-Outlook of Exchange to postfix the fetch by fetchmail email2trac on a Debian Machine.

Attachments (0)

Change History (9)

comment:1 Changed 14 years ago by bas

  • Component changed from blog to email2trac
  • Status changed from new to assigned

I just tried it to send an email with special chars in it, but that is encoded UTF and then trac has no problems with it. Can you send an email to basv@… that has an attachment with this enconding.

Did it work previously? (an earlier version of email2trac)

comment:2 Changed 14 years ago by obwandner@…

I don't now, we use the script since 2010-02-01, I have it downloaded 3 Days before.


comment:3 Changed 14 years ago by bas

Ok can send me a private email with this attachmnet that is encoded iso-8859? I will try to reproduce it. Trac can only handle utf-8 encoding.

comment:4 Changed 14 years ago by obwandner@…

There is something new happend: [attachment:"=?utf-?B?Vm9ybGFnZV9HZXNwcsOkY2hzZG9rdW1lbnRhdGlvbi5w?= =?utf-8?B?ZGY=?="]

The Filename was Coded in UTF-8 and converted to 7Bit by Outlook, then the File was Added, but the File name was also not encoded.

comment:5 Changed 14 years ago by bas

I am now a week off. But i think i removed to many code from the attachment() function. See r296 (revision 296). I remove the following block that causes problem you described:

1229	 	                        if sys.version_info[0] > 2 or (sys.version_info[0] == 2 and sys.version_info[1] >= 3): 
1230	 	                                try: 
1231	 	                                        filename = unicodedata.normalize('NFC', unicode(filename, 'utf-8')).encode('utf-8')   
1232	 	                                except TypeError: 
1233	 	                                        pass 

comment:6 Changed 14 years ago by bas

  • Milestone set to Version 1.2

comment:7 Changed 14 years ago by bas

(In [317])

  • A filename name can also containt unicode chars, so convert a filename name to unicode, see #177

comment:8 Changed 14 years ago by bas

  • Version changed from 1.0.0 to trunk

Did had a chance to test it?

comment:9 Changed 14 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

Gonna release a new version. So will close it

Add Comment

Modify Ticket

Change Properties
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.