Changeset 92 for emailtotracscript/trunk/email2trac.py.in
- Timestamp:
- 07/06/06 12:13:43 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/email2trac.py.in
r91 r92 198 198 else: 199 199 temp = string.strip(text) 200 temp = unicode(text, 'iso-8859-15') 200 201 201 202 if str: … … 408 409 if self.EMAIL_HEADER > 0: 409 410 head = self.email_header_txt(msg) 410 411 411 412 412 413 body_text = self.get_body_text(msg) … … 416 417 # field of a ticket 417 418 # 418 tkt['description'] = u'email2trac:%s\r\n{{{\r\n%s\r\n}}}' \419 tkt['description'] = 'email2trac:%s\r\n{{{\r\n%s\r\n}}}' \ 419 420 %(head, body_text) 420 421 … … 432 433 if self.MAILTO: 433 434 mailto = self.html_mailto_link(self.to_unicode(msg['subject']), ticket_id, body_text) 434 tkt['description'] = u'email2trac:%s%s\r\n{{{\r\n%s\r\n}}}' %(head, mailto, body_text)435 tkt['description'] = 'email2trac:%s%s\r\n{{{\r\n%s\r\n}}}' %(head, mailto, body_text) 435 436 comment = '\nadded mailto line\n' 436 437 changed = True … … 608 609 # We try to normalize the filename to utf-8 NFC if we can. 609 610 # Files uploaded from OS X might be in NFD. 611 # Check python version and then try it 610 612 # 611 613 if sys.version_info[0] > 2 or (sys.version_info[0] == 2 and sys.version_info[1] >= 3): 612 filename = unicodedata.normalize('NFC', unicode(filename, 'utf-8')).encode('utf-8') 614 try: 615 filename = unicodedata.normalize('NFC', unicode(filename, 'utf-8')).encode('utf-8') 616 except TypeError: 617 pass 613 618 614 619 url_filename = urllib.quote(filename)
Note: See TracChangeset
for help on using the changeset viewer.