diff hgext/convert/common.py @ 5287:c6f932d3e0f6

Don't decode unicode strings. This does not work with python2.3 and is probably not useful anyway with 2.4.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 07 Sep 2007 16:14:51 +0200
parents 6b4c332f241b
children f0931c0240b4
line wrap: on
line diff
--- 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: