mercurial/templatefilters.py
changeset 36563 9d71bd25554b
parent 36552 a185b1af207c
child 36573 9b6b02a5b589
--- a/mercurial/templatefilters.py	Fri Mar 02 07:14:59 2018 +0530
+++ b/mercurial/templatefilters.py	Thu Mar 01 20:44:38 2018 -0500
@@ -273,7 +273,7 @@
     """Any text. Returns the input text rendered as a sequence of
     XML entities.
     """
-    text = unicode(text, encoding.encoding, 'replace')
+    text = unicode(text, pycompat.sysstr(encoding.encoding), r'replace')
     return ''.join(['&#%d;' % ord(c) for c in text])
 
 @templatefilter('permissions')