#include "wx/string.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/file.h"
#include "wx/ffile.h"
#include "wx/textfile.h"
#include "wx/dir.h"
-#include "wx/utils.h"
#include "wx/tokenzr.h"
#include "wx/iconloc.h"
#include "wx/filename.h"
{
wxTextFile textfile(filename);
#if defined(__WXGTK20__) && wxUSE_UNICODE
- if ( !textfile.Open(wxConvUTF8) )
+ if ( !textfile.Open(wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_OCTAL)) )
#else
if ( !textfile.Open() )
#endif
nIndex = file.pIndexOf(wxT("#--Netscape"));
if (nIndex != wxNOT_FOUND)
{
- wxASSERT_MSG(false,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed"));
+ wxFAIL_MSG(wxT("Error in .mime.types\nTrying to mix Netscape and Metamail formats\nFile not modified"));
return false;
}
// metamail entreies
if (file.GetLineCount() > 0)
{
- wxASSERT_MSG(false, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
+ wxFAIL_MSG(wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
return false;
}
bool wxMimeTypesManagerImpl::Unassociate(wxFileType *ft)
{
+ InitIfNeeded();
+
wxArrayString sMimeTypes;
ft->GetMimeTypes(sMimeTypes);