X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93763ad5ba900aecb9220a36ebe7447313ea3e31..189da67c55cb8ce76725d77e58b76c1fc666d9a6:/src/html/winpars.cpp diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index e702952b46..13ef2c9ae6 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -18,14 +18,14 @@ #ifndef WXPRECOMP #include "wx/intl.h" #include "wx/dc.h" + #include "wx/log.h" + #include "wx/settings.h" #endif #include "wx/html/htmldefs.h" #include "wx/html/winpars.h" #include "wx/html/htmlwin.h" #include "wx/fontmap.h" -#include "wx/log.h" -#include "wx/settings.h" #include "wx/uri.h" @@ -196,7 +196,11 @@ void wxHtmlWinParser::InitParser(const wxString& source) m_tmpLastWasSpace = false; m_lastWordCell = NULL; + // open the toplevel container that contains everything else and that + // is never closed (this makes parser's life easier): OpenContainer(); + + // then open the first container into which page's content will go: OpenContainer(); #if !wxUSE_UNICODE @@ -537,7 +541,7 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc) else { #ifndef __WXMAC__ - // okay, let convert to ISO_8859-1, available always + // okay, let's convert to ISO_8859-1, available always m_OutputEnc = wxFONTENCODING_DEFAULT; #else m_OutputEnc = wxLocale::GetSystemEncoding() ; @@ -557,7 +561,7 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc) (m_OutputEnc == wxFONTENCODING_DEFAULT) ? wxFONTENCODING_ISO8859_1 : m_OutputEnc, wxCONVERT_SUBSTITUTE)) - { // total failture :-( + { // total failure :-( wxLogError(_("Failed to display HTML document in %s encoding"), wxFontMapper::GetEncodingName(enc).c_str()); m_InputEnc = m_OutputEnc = wxFONTENCODING_DEFAULT;