From f8090263de586a9dc00a3fda1eeb7546b5d838e0 Mon Sep 17 00:00:00 2001 From: PB Date: Sat, 9 Feb 2019 21:43:00 +0100 Subject: [PATCH] Fix recently introduced mojibake in text sample During the samples-wide removal of obsolete wxT macros in f58ea625968953ca93585ea7f93dcc07ad032d8f, the macros were accidentally removed also from the place where they were required (string literal casted to void* and then retrieved as wxChar*). This led to names for m_tab and m_enter controls displayed wrong when logging text events. Fix this by restoring wxS() in this particular place. See https://github.com/wxWidgets/wxWidgets/pull/945 Closes https://github.com/wxWidgets/wxWidgets/pull/1226 --- samples/text/text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/text/text.cpp b/samples/text/text.cpp index a057dbaee4..7e5256b0b9 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -1200,11 +1200,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_tab = new MyTextCtrl( this, 100, "Multiline, allow processing.", wxPoint(180,90), wxSize(200,70), wxTE_MULTILINE | wxTE_PROCESS_TAB ); - m_tab->SetClientData((void *)"tab"); + m_tab->SetClientData((void *)wxS("tab")); m_enter = new MyTextCtrl( this, 100, "Multiline, allow processing.", wxPoint(180,170), wxSize(200,70), wxTE_MULTILINE | wxTE_PROCESS_ENTER ); - m_enter->SetClientData((void *)"enter"); + m_enter->SetClientData((void *)wxS("enter")); m_textrich = new MyTextCtrl(this, wxID_ANY, "Allows more than 30Kb of text\n" "(on all Windows versions)\n"