0
可有人誰比我告訴我我在做什麼錯誤的方式更聰明..不應該只是這個過程......Python的Unicode和MIMEE
# encoding: utf-8
from email.MIMEText import MIMEText
msg = MIMEText("hi")
msg.set_charset('utf-8')
print msg.as_string()
a = 'Ho\xcc\x82tel Ste\xcc\x81phane '
b = unicode(a, "utf-8")
print b
msg = MIMEText(b)
msg.set_charset('utf-8')
print msg.as_string()
我難倒...
謝謝你釘了它! – rh0dium 2009-09-14 18:26:55