From 4d70ab089f130b18fadf17393ce0779f6d8010bf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Sep 2006 23:36:06 +0000 Subject: [PATCH] don't convert title to current encoding if input encoding is wxFONTENCODING_DEFAULT (this shouldn't be necessary and provokes an assert from wxCSConv ctor) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/m_layout.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index f8f5c34931..4986a9f649 100644 --- a/src/html/m_layout.cpp +++ b/src/html/m_layout.cpp @@ -293,9 +293,14 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE") tag.GetBeginPos(), tag.GetEndPos1()-tag.GetBeginPos()); #if !wxUSE_UNICODE && wxUSE_WCHAR_T - wxCSConv conv(m_WParser->GetInputEncoding()); - title = wxString(title.wc_str(conv), wxConvLocal); -#endif + const wxFontEncoding enc = m_WParser->GetInputEncoding(); + if ( enc != wxFONTENCODING_DEFAULT ) + { + // need to convert to the current one + title = wxString(title.wc_str(wxCSConv(enc)), wxConvLocal); + } +#endif // !wxUSE_UNICODE + title = m_WParser->GetEntitiesParser()->Parse(title); winIface->SetHTMLWindowTitle(title); -- 2.47.2