Changeset 7472 for main/waeup.sirp/trunk/src
- Timestamp:
- 14 Jan 2012, 19:25:40 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/smtp.py
r7470 r7472 108 108 if not isinstance(item, unicode): 109 109 item = unicode(item, 'utf-8') 110 return str(Header(item, ' latin1')) # try ascii, then latin1, then utf-8110 return str(Header(item, 'iso-8859-1')) # try ascii, then latin1, then utf-8 111 111 112 112 def encode_address(addr, name=u''): -
main/waeup.sirp/trunk/src/waeup/sirp/tests/test_smtp.py
r7470 r7472 79 79 result4 = encode_header_item(u'Name with umläut') 80 80 self.assertEqual(result1, u'Plain Name') 81 self.assertEqual(result2, u'=? latin1?q?Name_with_uml=E4ut?=')81 self.assertEqual(result2, u'=?iso-8859-1?q?Name_with_uml=E4ut?=') 82 82 self.assertEqual(result3, u'Plain Name') 83 self.assertEqual(result4, u'=? latin1?q?Name_with_uml=E4ut?=')83 self.assertEqual(result4, u'=?iso-8859-1?q?Name_with_uml=E4ut?=') 84 84 return 85 85 … … 93 93 self.assertEqual(result2, 'The Foo <foo@bar.baz>') 94 94 self.assertEqual(result3, 'The Foo <foo@bar.baz>') 95 self.assertEqual(result4, '=?latin1?q?With_Uml=E4ut?= <foo@bar.baz>') 95 self.assertEqual(result4, 96 '=?iso-8859-1?q?With_Uml=E4ut?= <foo@bar.baz>') 96 97 return 97 98
Note: See TracChangeset for help on using the changeset viewer.