Mercurial > public > mercurial-scm > hg-stable
diff mercurial/mail.py @ 31456:067add650129
encoding: factor out unicode variants of from/tolocal()
Unfortunately, these functions will be commonly used on Python 3.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 13 Mar 2017 09:11:08 -0700 |
parents | f6369544bf85 |
children | b306120844bf |
line wrap: on
line diff
--- a/mercurial/mail.py Mon Mar 13 08:53:31 2017 -0700 +++ b/mercurial/mail.py Mon Mar 13 09:11:08 2017 -0700 @@ -353,4 +353,4 @@ except UnicodeDecodeError: pass uparts.append(part.decode('ISO-8859-1')) - return encoding.tolocal(u' '.join(uparts).encode('UTF-8')) + return encoding.unitolocal(u' '.join(uparts))