[PATCH 4 of 5] mailutil: utf patches with appropriate charset

für testzwecke blacktrash at gmx.net
Tue Feb 19 15:15:04 CST 2008


* Christian Ebert on Tuesday, February 19, 2008 at 20:16:55 +0100
> --- a/hgext/mailutil.py
> +++ b/hgext/mailutil.py
> @@ -4,9 +4,9 @@
> 
> def ischarset(s, cs):
>     try:
> -        s.decode(cs)
> +        s.decode(cs).encode(cs)
>         return True
> -    except UnicodeDecodeError:
> +    except (UnicodeDecodeError, UnicodeEncodeError):
>         return False

this hunk is not-needed-test-case-leftover-got-into-queue
garbage, but it doesn't do any harm (I hope).

c
-- 
ich bin eine Null eine Null is eine runde Sache
--> <http://www.blacktrash.org/hanullmann/hanullmann.html>


More information about the Mercurial-devel mailing list