]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/xxx.py
docstring update
[wxWidgets.git] / wxPython / wx / tools / XRCed / xxx.py
index 03bb4f70bc905bca0d1638bf2c09c41b502b94ee..32636a55654fcbf2907d52583c6fdc512807ad04 100644 (file)
@@ -47,12 +47,16 @@ class xxxParam(xxxNode):
             self.textNode.data = value
     else:
         def value(self):
-            return self.textNode.data.encode(g.currentEncoding)
+            try:
+                return self.textNode.data.encode(g.currentEncoding)
+            except LookupError:
+                return self.textNode.data.encode()
         def update(self, value):
             try: # handle exception if encoding is wrong
                 self.textNode.data = unicode(value, g.currentEncoding)
             except UnicodeDecodeError:
-                wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate")
+                self.textNode.data = unicode(value)
+                #wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate")
 
 # Integer parameter
 class xxxParamInt(xxxParam):