From cafe0fd75e103b5182eeb6c87a6ef5bfab1a219f Mon Sep 17 00:00:00 2001 From: Roman Rolinsky Date: Wed, 13 Nov 2002 14:32:35 +0000 Subject: [PATCH] Added fix for unicode build (no convertion needed) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/tools/XRCed/xxx.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/wxPython/wxPython/tools/XRCed/xxx.py b/wxPython/wxPython/tools/XRCed/xxx.py index ce786c931c..aed4a8ae7b 100644 --- a/wxPython/wxPython/tools/XRCed/xxx.py +++ b/wxPython/wxPython/tools/XRCed/xxx.py @@ -36,10 +36,16 @@ class xxxParam(xxxNode): # Use convertion from unicode to current encoding self.textNode = text # Value returns string - def value(self): - return self.textNode.data.encode(currentEncoding) - def update(self, value): - self.textNode.data = unicode(value, currentEncoding) + if wxUSE_UNICODE: # no conversion is needed + def value(self): + return self.textNode.data + def update(self, value): + self.textNode.data = value + else: + def value(self): + return self.textNode.data.encode(currentEncoding) + def update(self, value): + self.textNode.data = unicode(value, currentEncoding) # Integer parameter class xxxParamInt(xxxParam):