X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64bce500c085d5450dff58082fff150a181c1bec..3d2d9036037d9ee51f47d878c3dcef4af4a6ef41:/wxPython/wx/tools/XRCed/xxx.py diff --git a/wxPython/wx/tools/XRCed/xxx.py b/wxPython/wx/tools/XRCed/xxx.py index bd0c72a08d..32636a5565 100644 --- a/wxPython/wx/tools/XRCed/xxx.py +++ b/wxPython/wx/tools/XRCed/xxx.py @@ -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): @@ -296,7 +300,7 @@ class xxxObject: # This is a little special: it is both xxxObject and xxxNode class xxxParamFont(xxxObject, xxxNode): - allParams = ['size', 'style', 'weight', 'family', 'underlined', + allParams = ['size', 'family', 'style', 'weight', 'underlined', 'face', 'encoding'] def __init__(self, parent, element): xxxObject.__init__(self, parent, element)