diff mercurial/util.py @ 31447:067add650129

encoding: factor out unicode variants of from/tolocal() Unfortunately, these functions will be commonly used on Python 3.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 13 Mar 2017 09:11:08 -0700
parents 807387581d89
children 6419cd243017
line wrap: on
line diff
--- a/mercurial/util.py	Mon Mar 13 08:53:31 2017 -0700
+++ b/mercurial/util.py	Mon Mar 13 09:11:08 2017 -0700
@@ -2654,7 +2654,7 @@
         file:///D:\data\hg
         """
         if pycompat.ispy3:
-            return encoding.fromlocal(self.__bytes__()).decode('utf-8')
+            return encoding.unifromlocal(self.__bytes__())
         return self.__bytes__()
 
     def __bytes__(self):