From 05df5fb4e07aeff66d9da63022599f1aa2d3dc23 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 5 Jan 2009 17:07:17 +0900 Subject: [PATCH] fix another unicode bug, add shortcut to options --- ankiqt/ui/facteditor.py | 4 ++-- designer/main.ui | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index a8ae2b9f5..460795fc3 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -641,11 +641,11 @@ class FactEdit(QTextEdit): def _retrieveURL(self, url, ext): filecontents = urllib2.urlopen(url).read() - (fd, name) = tempfile.mkstemp(suffix=".%s" % ext) + (fd, name) = tempfile.mkstemp(suffix=".%s" % ext.encode("ascii")) file = os.fdopen(fd, "wb") file.write(filecontents) file.flush() - return name + return unicode(name, sys.getfilesystemencoding()) def simplifyHTML(self, html): "Remove all style information and P tags." diff --git a/designer/main.ui b/designer/main.ui index eefb0956a..e62ce2014 100644 --- a/designer/main.ui +++ b/designer/main.ui @@ -249,7 +249,7 @@ - Options>> + &Options>> true