--- a/mercurial/templatefilters.py Sun Dec 27 17:16:45 2015 +0900
+++ b/mercurial/templatefilters.py Sun Dec 27 17:45:05 2015 +0900
@@ -377,6 +377,10 @@
""":emailuser: Any text. Returns the user portion of an email address."""
return util.emailuser(text)
+def utf8(text):
+ """:utf8: Any text. Converts from the local character encoding to UTF-8."""
+ return encoding.fromlocal(text)
+
def xmlescape(text):
text = (text
.replace('&', '&')
@@ -422,6 +426,7 @@
"urlescape": urlescape,
"user": userfilter,
"emailuser": emailuser,
+ "utf8": utf8,
"xmlescape": xmlescape,
}