--- ZSQLExtend/importFMPXML.py 2008/01/09 14:43:50 1.21 +++ ZSQLExtend/importFMPXML.py 2008/02/04 19:06:34 1.22 @@ -19,7 +19,7 @@ except: fm_ns = 'http://www.filemaker.com/fmpxmlresult' -version_string = "V0.5.1 ROC 9.1.2008" +version_string = "V0.5.2 ROC 4.2.2008" def unicodify(text, withNone=False): """decode str (utf-8 or latin-1 representation) into unicode object""" @@ -41,10 +41,10 @@ def utf8ify(text, withNone=False): return None if not text: return "" - if isinstance(text, str): - return text - else: + if isinstance(text, unicode): return text.encode('utf-8') + else: + return text def getTextFromNode(nodename): """get the cdata content of a node"""