review/rutil.py @ a21fcb365fcd

tests: test for utf-8 and non-utf-8 usernames
author Steve Losh <steve@stevelosh.com>
date Thu, 22 Jul 2010 19:55:52 -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')