Mercurial > hg
changeset 21745:4c62478be2ea
minirst: explicitly decode substitutions
Caught by Augie and sys.setdefaultencoding("undefined")
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 13 Jun 2014 14:14:02 -0500 |
parents | 395e29928db2 |
children | 2d47d81c79fb |
files | mercurial/minirst.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/minirst.py Fri May 30 12:12:03 2014 -0700 +++ b/mercurial/minirst.py Fri Jun 13 14:14:02 2014 -0500 @@ -56,7 +56,7 @@ # on strings in local encoding causes invalid byte sequences. utext = text.decode(encoding.encoding) for f, t in substs: - utext = utext.replace(f, t) + utext = utext.replace(f.decode("ascii"), t.decode("ascii")) return utext.encode(encoding.encoding) _blockre = re.compile(r"\n(?:\s*\n)+")