Ignore:
Timestamp:
06/26/06 10:01:47 (18 years ago)
Author:
bas
Message:

EmailtoTracScript?:

email2trac.py.in:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/email2trac.py.in

    r88 r89  
    497497                                #
    498498                                charset = part.get_content_charset('iso-8859-15')
    499                                 ubody_text = unicode(body_text, charset).encode('utf-8')
     499
     500                                try:
     501                                        temp = unicode(body_text, charset)
     502                                except (UnicodeError,LookupError):
     503                                        temp = unicode(body_text, 'iso-8859-15')
     504
     505                                #ubody_text = unicode(body_text, charset).encode('utf-8')
     506                                ubody_text = temp.encode('utf-8')
    500507
    501508                        elif part.get_content_type() == 'text/html':
Note: See TracChangeset for help on using the changeset viewer.