mercurial/mail.py
changeset 9715 f0e99a2eac76
parent 9246 2de7d96593db
child 9948 e5b44a7986d0
child 10263 25e572394f5c
--- a/mercurial/mail.py	Thu Nov 05 11:05:13 2009 +0100
+++ b/mercurial/mail.py	Thu Nov 05 10:49:28 2009 +0100
@@ -169,7 +169,7 @@
     try:
         acc, dom = addr.split('@')
         acc = acc.encode('ascii')
-        dom = dom.encode('idna')
+        dom = dom.decode(encoding.encoding).encode('idna')
         addr = '%s@%s' % (acc, dom)
     except UnicodeDecodeError:
         raise util.Abort(_('invalid email address: %s') % addr)