summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kramm <kramm@quiss.org>2012-04-09 16:49:31 -0700
committerMatthias Kramm <kramm@quiss.org>2012-04-09 16:49:31 -0700
commit060d35b2b255ff50a885f094a26cabdfa319e915 (patch)
tree106b4788186f0de9855d1453f0a9fa62cb25997c
parent47193313f1b6d27f4253c16be67f98418c6358e9 (diff)
don't fail on bad encodings
-rw-r--r--wx/lib/document.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wx/lib/document.py b/wx/lib/document.py
index 32c36787..1d7cabf5 100644
--- a/wx/lib/document.py
+++ b/wx/lib/document.py
@@ -209,7 +209,10 @@ class Document(object):
def Load(self, filename):
self.__lastsavefile = self.__SwapExtension(filename, "swf")
- filename = filename.encode(sys.getfilesystemencoding())
+ try:
+ filename = filename.encode(sys.getfilesystemencoding())
+ except LookupError:
+ pass
self.__pdffilename = filename
#print 'Load',self.__preview_parameters