Fixing bug when building textual code containing comment with special characters
--- a/PLCControler.py Sun Jan 08 19:33:26 2012 +0100
+++ b/PLCControler.py Mon Jan 09 11:08:08 2012 +0100
@@ -533,10 +533,10 @@
try:
self.ProgramChunks = GenerateCurrentProgram(self, self.Project, errors, warnings)
self.NextCompiledProject = self.Copy(self.Project)
- program_text = "".join([item[0] for item in self.ProgramChunks])
+ program_text = "".join([item[0].decode("utf-8") for item in self.ProgramChunks])
if filepath is not None:
programfile = open(filepath, "w")
- programfile.write(program_text)
+ programfile.write(program_text.encode("utf-8"))
programfile.close()
self.ProgramFilePath = filepath
return program_text, errors, warnings