154 |
154 |
155 It reads the output of the process, formats it and inserts it into |
155 It reads the output of the process, formats it and inserts it into |
156 the contents pane. |
156 the contents pane. |
157 """ |
157 """ |
158 if self.proc is not None: |
158 if self.proc is not None: |
159 s = unicode(self.proc.readAllStandardOutput()) |
159 s = str(self.proc.readAllStandardOutput(), |
|
160 Preferences.getSystem("IOEncoding"), |
|
161 'replace') |
160 self.resultbox.insertPlainText(s) |
162 self.resultbox.insertPlainText(s) |
161 self.resultbox.ensureCursorVisible() |
163 self.resultbox.ensureCursorVisible() |
162 if not self.__hasAddOrDelete and len(s) > 0: |
164 if not self.__hasAddOrDelete and len(s) > 0: |
163 # check the output |
165 # check the output |
164 for l in s.split(os.linesep): |
166 for l in s.split(os.linesep): |
173 It reads the error output of the process and inserts it into the |
175 It reads the error output of the process and inserts it into the |
174 error pane. |
176 error pane. |
175 """ |
177 """ |
176 if self.proc is not None: |
178 if self.proc is not None: |
177 self.errorGroup.show() |
179 self.errorGroup.show() |
178 s = unicode(self.proc.readAllStandardError()) |
180 s = str(self.proc.readAllStandardError(), |
|
181 Preferences.getSystem("IOEncoding"), |
|
182 'replace') |
179 self.errors.insertPlainText(s) |
183 self.errors.insertPlainText(s) |
180 self.errors.ensureCursorVisible() |
184 self.errors.ensureCursorVisible() |
181 |
185 |
182 def on_passwordCheckBox_toggled(self, isOn): |
186 def on_passwordCheckBox_toggled(self, isOn): |
183 """ |
187 """ |