From 678b263756c9d93e0003ca1d96f2dcdd595caefb Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 9 Dec 2002 11:22:43 +0000 Subject: [PATCH] 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 --- src/mac/carbon/tooltip.cpp | 5 ++++- src/mac/tooltip.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 ; -- 2.45.2