diff -r 42af0590f4b9 -r 8321b083a83d mercurial/util.py --- a/mercurial/util.py Sun Nov 06 03:12:40 2016 +0530 +++ b/mercurial/util.py Sun Nov 06 12:18:23 2016 +0900 @@ -938,6 +938,9 @@ else: datapath = os.path.dirname(__file__) +if not isinstance(datapath, bytes): + datapath = pycompat.fsencode(datapath) + i18n.setdatapath(datapath) _hgexecutable = None