Fix bug when trying to paste POU containing utf-8 characters
authorlaurent
Tue, 17 Jan 2012 20:06:07 +0100
changeset 629 ddf363817ffa
parent 628 edcd40605fff
child 630 9d7e38e271cb
Fix bug when trying to paste POU containing utf-8 characters
PLCControler.py
--- a/PLCControler.py	Tue Jan 17 20:04:52 2012 +0100
+++ b/PLCControler.py	Tue Jan 17 20:06:07 2012 +0100
@@ -621,7 +621,7 @@
         Adds the POU defined by 'pou_xml' to the current project with type 'pou_type'
         '''
         try:
-            tree = minidom.parseString(pou_xml)
+            tree = minidom.parseString(pou_xml.encode("utf-8"))
             root = tree.childNodes[0]
         except:
             return _("Couldn't paste non-POU object.")