]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlfilt.cpp
include wx/mdi.h also for non-PCH builds
[wxWidgets.git] / src / html / htmlfilt.cpp
index 28c3de9e68acc0d0ac045b9515b26a5173dc6f2a..9aaa86d4ebadd4146ff018785f214fbadf66012c 100644 (file)
@@ -153,15 +153,19 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const
     }
     else
     {
-        wxString tmpdoc;
-        ReadString(tmpdoc, s, wxConvISO8859_1);
+        size_t size = s->GetSize();
+        wxCharBuffer buf( size+1 );
+        s->Read( buf.data(), size );
+        *(buf.data() + size) = 0;
+        wxString tmpdoc( buf, wxConvISO8859_1);
+        
         wxString charset = wxHtmlParser::ExtractCharsetInformation(tmpdoc);
         if (charset.empty())
             doc = tmpdoc;
         else
         {
             wxCSConv conv(charset);
-            doc = wxString(tmpdoc.mb_str(wxConvISO8859_1), conv);
+            doc = wxString( buf, conv );
         }
     }
 #else // !wxUSE_UNICODE