+    else
+    {
+        wxString tmpdoc;
+        ReadString(tmpdoc, s, wxConvISO8859_1);
+        wxString charset = wxHtmlParser::ExtractCharsetInformation(tmpdoc);
+        if (charset.empty())
+            doc = tmpdoc;
+        else
+        {
+            wxCSConv conv(charset);
+            doc = wxString(tmpdoc.mb_str(wxConvISO8859_1), conv);
+        }
+    }
+#else // !wxUSE_UNICODE
+    ReadString(doc, s, wxConvLibc);
+    // add meta tag if we obtained this through http:
+    if (!file.GetMimeType().empty())
+    {
+        wxString hdr;
+        wxString mime = file.GetMimeType();
+        hdr.Printf(_T("<meta http-equiv=\"Content-Type\" content=\"%s\">"), mime.c_str());
+        return hdr+doc;
+    }
+#endif