gedit r6594 - in trunk: . plugins/pythonconsole/pythonconsole
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6594 - in trunk: . plugins/pythonconsole/pythonconsole
- Date: Sat, 1 Nov 2008 15:30:30 +0000 (UTC)
Author: pborelli
Date: Sat Nov 1 15:30:30 2008
New Revision: 6594
URL: http://svn.gnome.org/viewvc/gedit?rev=6594&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/plugins/pythonconsole/pythonconsole/console.py
Modified: trunk/plugins/pythonconsole/pythonconsole/console.py
==============================================================================
--- trunk/plugins/pythonconsole/pythonconsole/console.py (original)
+++ trunk/plugins/pythonconsole/pythonconsole/console.py Sat Nov 1 15:30:30 2008
@@ -264,7 +264,12 @@
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]