# HG changeset patch # User Edouard Tisserant # Date 1724017016 -7200 # Node ID 6c3469588c123bf310be9783011a3c6e7a6f12c6 # Parent 060ed03e3aeca61eff236dd033a116dd127c2275 IDE: failsafe escaping for input not matching utf-8 encoding diff -r 060ed03e3aec -r 6c3469588c12 CodeFileTreeNode.py --- a/CodeFileTreeNode.py Sun Aug 18 18:23:18 2024 +0200 +++ b/CodeFileTreeNode.py Sun Aug 18 23:36:56 2024 +0200 @@ -107,7 +107,7 @@ filepath = self.CodeFileName() if os.path.isfile(filepath): - xmlfile = open(filepath, 'r') + xmlfile = open(filepath, 'r', encoding='utf-8', errors='backslashreplace') codefile_xml = xmlfile.read() xmlfile.close() diff -r 060ed03e3aec -r 6c3469588c12 util/ProcessLogger.py --- a/util/ProcessLogger.py Sun Aug 18 18:23:18 2024 +0200 +++ b/util/ProcessLogger.py Sun Aug 18 23:36:56 2024 +0200 @@ -136,7 +136,7 @@ if _debug and self.logger: self.logger.write("(DEBUG) launching:\n" + self.Command_str + "\n") - self.Proc = subprocess.Popen(self.Command, encoding="utf-8", **popenargs) + self.Proc = subprocess.Popen(self.Command, encoding="utf-8", errors="backslashreplace", **popenargs) self.outt = outputThread( self.Proc,