review/rutil.py @ 9d8c2dd1ed72

web: fix unicode in revhash urls
author Steve Losh <steve@stevelosh.com>
date Sat, 10 Jul 2010 14:14:25 -0400
parents 1b9066798f87
children 96afc843f1a7
from mercurial import encoding

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

def fromlocal(s):
    return encoding.fromlocal(s).decode('UTF-8')