# HG changeset patch # User Brendan Cully # Date 1153442177 -7200 # Node ID 3b53fa20dda8651241298958cdf2af509d050c57 # Parent f47432ae5376026970c8cbcf1a7d96c2bf3ddf9d Preserve multibyte UTF-8 characters when obfuscating. This version uses the unicode 'replace' option, so non-UTF-8 encodings will still be mangled. Luckily, there aren't any of those. diff -r f47432ae5376 -r 3b53fa20dda8 mercurial/templater.py --- a/mercurial/templater.py Fri Jul 21 02:31:59 2006 +0200 +++ b/mercurial/templater.py Fri Jul 21 02:36:17 2006 +0200 @@ -241,6 +241,7 @@ return text.replace('\n', '
\n') def obfuscate(text): + text = unicode(text, 'utf-8', 'replace') return ''.join(['&#%d;' % ord(c) for c in text]) def domain(author):