review/rutil.py @ 5bef954cfecd

decode revision descriptions in templates (fixes #79)
author Mikhail Lukyanchenko <ml@uptimebox.ru>
date Mon, 19 Dec 2011 13:07:35 +0400
parents 96afc843f1a7
children (none)
from mercurial import encoding

def tolocal(s):
    return encoding.tolocal(s.encode('UTF-8'))

def fromlocal(s):
    return s.decode(encoding.encoding, 'replace')