New submission from norbidur <norbi...@users.sourceforge.net>: SMTPHandler fails when receiving unicode strings.
example : import logging,logging.handlers smtpHandler = logging.handlers.SMTPHandler( mailhost=("smtp.free.fr",25), fromaddr="f...@free.fr", toaddrs="t...@free.fr", subject=u"error message") LOG = logging.getLogger() LOG.addHandler(smtpHandler) LOG.error(u"accentu\u00E9") -> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 108 : ordinal not in range(128) There has been a discuss on this in http://groups.google.com/group/comp.lang.python/browse_thread/thread/759df42f9374d1b6/05ad55c388c746e3?lnk=raot&pli=1 FileHandler does not behave the same way : for this handler's family an encoding can be specified, and if this encoding fails, there is a fallback to UTF-8. ---------- components: Unicode messages: 109621 nosy: norbidur priority: normal severity: normal status: open title: SMTPHandler does not handle unicode strings type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9208> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com