yuja added a comment.

  >>  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?
  
  It isn't lossy in that any input bytes will never be dropped. If no reasonable
  charset found, it falls back to 'us-ascii' to send bytes transparently.

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers, indygreg
Cc: yuja, indygreg, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to