D3953: mail: fix _encode to be more correct on Python 3

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Aug 10 02:58:43 UTC 2018


indygreg accepted this revision.
indygreg added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> mail.py:249-254
>  def _encode(ui, s, charsets):
>      '''Returns (converted) string, charset tuple.
>      Finds out best charset by cycling through sendcharsets in descending
>      order. Tries both encoding and fallbackencoding for input. Only as
>      last resort send as is in fake ascii.
>      Caveat: Do not use for mail parts containing patches!'''

Maybe this should be renamed  `_encodelossy` to avoid surprises?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3953

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list