An attempt at fixing the Unicode conversion errors when loading

configuration files - try ISO-8859-1 if Unicode fails.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2006-12-04 10:07:53 +00:00
parent 67339f7d9d
commit 1dfeae4c13

View File

@ -750,7 +750,12 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase,
{
wxFileName fullname(dirbase, filename);
wxMimeTextFile file;
if(! file.Open( fullname.GetFullPath() )) return;
{
wxLogNull logNull;
if ( !file.Open(fullname.GetFullPath()) )
if ( !file.Open(fullname.GetFullPath(), wxConvISO8859_1) )
return;
}
wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"),
fullname.GetFullPath().c_str());
@ -935,7 +940,14 @@ void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirname,
void wxMimeTypesManagerImpl::LoadKDEApp(const wxString& filename)
{
wxMimeTextFile file;
if ( !file.Open(filename) ) return;
{
wxLogNull logNull;
if ( !file.Open(filename) )
if ( !file.Open(filename, wxConvISO8859_1) )
return;
}
wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"), filename.c_str());
// Here, only type 'Application' should be considered.