Unicode everything

- Convert every strings to be sent in jabber messages in MailConnection to unicode.

darcs-hash:20060129133009-86b55-f5ea2d43f4187dd33383fa940108e23df4c3bec7.gz
This commit is contained in:
David Rousselie
2006-01-29 14:30:09 +01:00
parent 8fdd9d3be4
commit 6bbdb0be31
3 changed files with 29 additions and 29 deletions

View File

@@ -1,11 +1,11 @@
# -*- coding: iso-8859-15 -*-
# -*- coding: utf-8 -*-
##
## mailconnection_test.py
## Login : <adro8400@claralinux>
## Started on Fri May 13 11:32:51 2005 adro8400
## $Id: test_mailconnection.py,v 1.2 2005/09/18 20:24:07 dax Exp $
## Login : David Rousselie <david.rousselie@happycoders.org>
## Started on Fri May 13 11:32:51 2005 David Rousselie
## $Id: test_mailconnection.py,v 1.2 2005/09/18 20:24:07 David Rousselie Exp $
##
## Copyright (C) 2005 adro8400
## Copyright (C) 2005 David Rousselie
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
@@ -54,7 +54,7 @@ class MailConnection_TestCase(unittest.TestCase):
test_get_decoded_part_encoded = \
make_test((True, False, False), \
lambda self, email: self.connection.get_decoded_part(email), \
u"Encoded single part with 'iso-8859-15' charset (<EFBFBD><EFBFBD><EFBFBD>)")
u"Encoded single part with 'iso-8859-15' charset (éàê)")
test_format_message_summary_not_encoded = \
make_test((False, False, True), \
@@ -64,8 +64,8 @@ class MailConnection_TestCase(unittest.TestCase):
test_format_message_summary_encoded = \
make_test((True, False, True), \
lambda self, email: self.connection.format_message_summary(email), \
u"From : encoded from (<EFBFBD><EFBFBD><EFBFBD>)\nSubject : encoded subject " + \
u"(<EFBFBD><EFBFBD><EFBFBD>)\n\n")
u"From : encoded from (éàê)\nSubject : encoded subject " + \
u"(éàê)\n\n")
test_format_message_summary_partial_encoded = \
make_test((True, False, True), \
@@ -77,8 +77,8 @@ class MailConnection_TestCase(unittest.TestCase):
"\"" + str(email["From"]) \
+ "\" not encoded part") or \
self.connection.format_message_summary(email), \
u"From : \"encoded from (<EFBFBD><EFBFBD><EFBFBD>)\" not encoded part\nSubject " + \
u": \"encoded subject (<EFBFBD><EFBFBD><EFBFBD>)\" not encoded part\n\n")
u"From : \"encoded from (éàê)\" not encoded part\nSubject " + \
u": \"encoded subject (éàê)\" not encoded part\n\n")
test_format_message_single_not_encoded = \
make_test((False, False, True), \
@@ -89,9 +89,9 @@ class MailConnection_TestCase(unittest.TestCase):
test_format_message_single_encoded = \
make_test((True, False, True), \
lambda self, email: self.connection.format_message(email), \
u"From : encoded from (<EFBFBD><EFBFBD><EFBFBD>)\nSubject : encoded subject " + \
u"(<EFBFBD><EFBFBD><EFBFBD>)\n\nEncoded single part with 'iso-8859-15' charset" + \
u" (\xe9\xe0\xea)\n")
u"From : encoded from (éàê)\nSubject : encoded subject " + \
u"(éàê)\n\nEncoded single part with 'iso-8859-15' charset" + \
u" (éàê)\n")
test_format_message_multi_not_encoded = \
make_test((False, True, True), \
@@ -102,9 +102,9 @@ class MailConnection_TestCase(unittest.TestCase):
test_format_message_multi_encoded = \
make_test((True, True, True), \
lambda self, email: self.connection.format_message(email), \
u"From : encoded from (<EFBFBD><EFBFBD><EFBFBD>)\nSubject : encoded subject (<EFBFBD><EFBFBD>" + \
u"<EFBFBD>)\n\nEncoded multipart1 with 'iso-8859-15' charset (<EFBFBD><EFBFBD><EFBFBD>" + \
u")\nEncoded multipart2 with 'iso-8859-15' charset (<EFBFBD><EFBFBD><EFBFBD>)\n")
u"From : encoded from (éàê)\nSubject : encoded subject (éà" + \
u"ê)\n\nEncoded multipart1 with 'iso-8859-15' charset (éàê" + \
u")\nEncoded multipart2 with 'iso-8859-15' charset (éàê)\n")
class POP3Connection_TestCase(unittest.TestCase):