X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/396fb5091dce8f2160a224c3377111256bf053ea..2cef71bc23a9cd0ec543e451848fb9e88ace36e9:/wxPython/src/gtk/_misc.py diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index 4da6a8285f..b1481840b4 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -3852,12 +3852,13 @@ class DateTime(object): def __repr__(self): if self.IsValid(): - return '' % ( self.Format(), self.this) + f = self.Format().encode(wx.GetDefaultPyEncoding()) + return '' % ( f, self.this) else: return '' % self.this def __str__(self): if self.IsValid(): - return self.Format() + return self.Format().encode(wx.GetDefaultPyEncoding()) else: return "INVALID DateTime" @@ -4177,9 +4178,10 @@ class TimeSpan(object): return _misc_.TimeSpan_Format(*args, **kwargs) def __repr__(self): - return '' % ( self.Format(), self.this) + f = self.Format().encode(wx.GetDefaultPyEncoding()) + return '' % ( f, self.this) def __str__(self): - return self.Format() + return self.Format().encode(wx.GetDefaultPyEncoding()) class TimeSpanPtr(TimeSpan):