X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/155ecd4c4221d3bbc7aa93d472d11948f21d21ab..6716fce4398b873d0153a487de2a937084ec9b60:/src/html/m_layout.cpp diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index 07b483b7d0..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); @@ -406,7 +411,8 @@ TAG_HANDLER_BEGIN(SUBSUP, "SUB,SUP") wxHtmlCell *c = cont->GetLastChild(); m_WParser->SetScriptMode(issub ? wxHTML_SCRIPT_SUB : wxHTML_SCRIPT_SUP); - m_WParser->SetScriptBaseline(oldbase + c->GetScriptBaseline()); + m_WParser->SetScriptBaseline( + oldbase + c ? c->GetScriptBaseline() : 0); // select smaller font m_WParser->SetFontSize(m_WParser->GetFontSize()-2);