#if wxUSE_HTML && wxUSE_STREAMS
#ifndef WXPRECOMP
+ #include "wx/image.h"
#endif
-#include "wx/image.h"
-
#include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h"
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);
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);