In unicode builds convert the source files and overview text to
unicode before displaying them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -261,6 +261,8 @@ try:
|
|||||||
|
|
||||||
# Some methods to make it compatible with how the wxTextCtrl is used
|
# Some methods to make it compatible with how the wxTextCtrl is used
|
||||||
def SetValue(self, value):
|
def SetValue(self, value):
|
||||||
|
if wx.USE_UNICODE:
|
||||||
|
value = value.decode('iso8859_1')
|
||||||
self.SetReadOnly(False)
|
self.SetReadOnly(False)
|
||||||
self.SetText(value)
|
self.SetText(value)
|
||||||
self.SetReadOnly(True)
|
self.SetReadOnly(True)
|
||||||
@@ -736,6 +738,8 @@ class wxPythonDemo(wx.Frame):
|
|||||||
lead = text[:6]
|
lead = text[:6]
|
||||||
if lead != '<html>' and lead != '<HTML>':
|
if lead != '<html>' and lead != '<HTML>':
|
||||||
text = '<br>'.join(text.split('\n'))
|
text = '<br>'.join(text.split('\n'))
|
||||||
|
if wx.USE_UNICODE:
|
||||||
|
text = text.decode('iso8859_1')
|
||||||
self.ovr.SetPage(text)
|
self.ovr.SetPage(text)
|
||||||
self.nb.SetPageText(0, name)
|
self.nb.SetPageText(0, name)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user