enable non-latin variable descriptions in CodeFileEditor
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 20 Jun 2017 17:01:19 +0300
changeset 1699 65ce8afe4b8f
parent 1698 ae3e819252fc
child 1700 df50e13a94d6
enable non-latin variable descriptions in CodeFileEditor

fix following backtrace:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128)
Traceback (most recent call last):
File "beremiz/editors/CodeFileEditor.py", line 610, in GetValue
return str(self.data[row].get(self.GetColLabelValue(col, False), ""))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128)
editors/CodeFileEditor.py
--- a/editors/CodeFileEditor.py	Tue Jun 20 16:36:17 2017 +0300
+++ b/editors/CodeFileEditor.py	Tue Jun 20 17:01:19 2017 +0300
@@ -607,7 +607,7 @@
             if col == 0:
                 return row + 1
             else:
-                return str(self.data[row].get(self.GetColLabelValue(col, False), ""))
+                return unicode(self.data[row].get(self.GetColLabelValue(col, False), ""))
 
     def _updateColAttrs(self, grid):
         """