# HG changeset patch # User laurent # Date 1326827167 -3600 # Node ID ddf363817ffa466e91b98eb268b6d11612e90734 # Parent edcd40605fffca0f9821628abc26b615002ec733 Fix bug when trying to paste POU containing utf-8 characters diff -r edcd40605fff -r ddf363817ffa 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.")