From 981e62aa85597e36b40d89274bcf1203e5ae5f67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 16 Jan 2000 22:53:25 +0000 Subject: [PATCH] wxHtmlFilterHTML adds fake tag so that the parser knows charset git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlfilt.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/html/htmlfilt.cpp b/src/html/htmlfilt.cpp index 350037cea1..199b91c6c4 100644 --- a/src/html/htmlfilt.cpp +++ b/src/html/htmlfilt.cpp @@ -130,7 +130,7 @@ bool wxHtmlFilterHTML::CanRead(const wxFSFile& file) const // This is true in most case but some page can return: // "text/html; char-encoding=...." // So we use Find instead - return (file.GetMimeType().Find(wxT("text/html")) == 0); + return (file.GetMimeType().Find(_("text/html")) == 0); } @@ -148,7 +148,15 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const doc = src; delete[] src; - return doc; + // add meta tag if we obtained this through http: + if (file.GetMimeType().Find(_T("; charset=")) == 0) + { + wxString s(_T(""); + return s; + } + + else return doc; } -- 2.45.2