Commit 9ca44333 authored by Paolo Borelli's avatar Paolo Borelli Committed by Paolo Borelli

decode to utf8 before eval and execute. Fixes bug 558149, patch by Vincent

2008-11-01  Paolo Borelli  <pborelli@katamail.com>

	* plugins/pythonconsole/pythinconsole/console.py: decode to utf8
	before eval and execute. Fixes bug 558149, patch by Vincent Povirk.


svn path=/trunk/; revision=6594
parent 8a28148b
2008-11-01 Paolo Borelli <pborelli@katamail.com>
* plugins/pythonconsole/pythinconsole/console.py: decode to utf8
before eval and execute. Fixes bug 558149, patch by Vincent Povirk.
2008-11-01 Paolo Borelli <pborelli@katamail.com>
* plugins/sort/sort.ui:
......
......@@ -264,7 +264,12 @@ class PythonConsole(gtk.ScrolledWindow):
def __run(self, command):
sys.stdout, self.stdout = self.stdout, sys.stdout
sys.stderr, self.stderr = self.stderr, sys.stderr
# eval and exec are broken in how they deal with utf8-encoded
# strings so we have to explicitly decode the command before
# passing it along
command = command.decode('utf8')
try:
try:
r = eval(command, self.namespace, self.namespace)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment