hgext/convert/common.py
changeset 5287 c6f932d3e0f6
parent 5172 6b4c332f241b
child 5352 f0931c0240b4
--- a/hgext/convert/common.py
+++ b/hgext/convert/common.py
@@ -75,6 +75,8 @@ class converter_source(object):
         if not encoding:
             encoding = self.encoding or 'utf-8'
 
+        if isinstance(s, unicode):
+            return s.encode("utf-8")
         try:
             return s.decode(encoding).encode("utf-8")
         except: