X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/396fb5091dce8f2160a224c3377111256bf053ea..ac7f7b51da8ce61a373a698856d1dad19ca9395e:/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):