From a4155269c575b3a51b017d8d1a0f64619355e623 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 29 May 2010 07:25:38 +0000 Subject: [PATCH] =?UTF-8?q?bug=20fix=20(unicode(unicode)=20results=20in=20?= =?UTF-8?q?=E2=80=9CTypeError:=20decoding=20Unicode=20is=20not=20supported?= =?UTF-8?q?=E2=80=9D=20(http://www.red-mercury.com/blog/eclectic-tech/pyth?= =?UTF-8?q?on-mystery-of-the-day/)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/xmldump.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/xmldump.py b/lib/core/xmldump.py index 33724c49e..4a351e191 100644 --- a/lib/core/xmldump.py +++ b/lib/core/xmldump.py @@ -131,8 +131,7 @@ class XMLDump: if attrValue is None : attr.nodeValue = unicode("","utf-8") else : - escaped_data = unicode(attrValue) - attr.nodeValue = unicode(escaped_data,"utf-8") + attr.nodeValue = attrValue if isinstance(attrValue, unicode) else unicode(attrValue,"utf-8") return attr def __formatString(self, string):