From: Julian Smart Date: Mon, 9 Dec 2002 11:22:43 +0000 (+0000) Subject: Applied patch [ 632115 ] Fixed internationalization on tooltips X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/678b263756c9d93e0003ca1d96f2dcdd595caefb?ds=inline Applied patch [ 632115 ] Fixed internationalization on tooltips wxMac's wxTooltip assumed that text was always PC encoded, and always converted the string using wxMacMakeMacStringFromPC(). This worked fine for English characters, but multi-byte encoded languages such as Japanese (SJIS) because garbled. I've added a check for "wxApp::s_macDefaultEncodingIsPC" before performing the conversion similar to other controls. Nilesh Agarwalla git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 317fe723fd..2fbce9c667 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -190,7 +190,10 @@ void wxMacToolTip::Setup( WindowRef win , wxString text , wxPoint localPosition m_mark++ ; Clear() ; m_position = localPosition ; - m_label = wxMacMakeMacStringFromPC( text ) ; + if( wxApp::s_macDefaultEncodingIsPC ) + m_label = wxMacMakeMacStringFromPC( text ) ; + else + m_label = text ; m_window =win; s_ToolTipWindowRef = m_window ; m_backpict = NULL ; diff --git a/src/mac/tooltip.cpp b/src/mac/tooltip.cpp index 317fe723fd..2fbce9c667 100644 --- a/src/mac/tooltip.cpp +++ b/src/mac/tooltip.cpp @@ -190,7 +190,10 @@ void wxMacToolTip::Setup( WindowRef win , wxString text , wxPoint localPosition m_mark++ ; Clear() ; m_position = localPosition ; - m_label = wxMacMakeMacStringFromPC( text ) ; + if( wxApp::s_macDefaultEncodingIsPC ) + m_label = wxMacMakeMacStringFromPC( text ) ; + else + m_label = text ; m_window =win; s_ToolTipWindowRef = m_window ; m_backpict = NULL ;