--- a/PLCControler.py Mon Apr 25 17:23:04 2016 +0300
+++ b/PLCControler.py Wed Apr 27 18:42:30 2016 +0300
@@ -2317,7 +2317,7 @@
new_id = {}
try:
- instances, error = LoadPouInstances(text.encode("utf-8"), bodytype)
+ instances, error = LoadPouInstances(text, bodytype)
except:
instances, error = [], ""
if error is not None or len(instances) == 0:
--- a/xmlclass/xmlclass.py Mon Apr 25 17:23:04 2016 +0300
+++ b/xmlclass/xmlclass.py Wed Apr 27 18:42:30 2016 +0300
@@ -1690,7 +1690,7 @@
return etree.QName(self.tag).localname
def tostring(self):
- return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True))
+ return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True, encoding='utf-8')).decode('utf-8')
class XMLElementClassLookUp(etree.PythonElementClassLookup):