[issue9208] SMTPHandler does not handle unicode strings

2010-07-09 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee:  - vinay.sajip
nosy: +vinay.sajip
versions: +Python 3.2 -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



[issue9208] SMTPHandler does not handle unicode strings

2010-07-08 Thread norbidur

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=uerror message)
LOG = logging.getLogger()
LOG.addHandler(smtpHandler)
LOG.error(uaccentu\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=raotpli=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