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:
@@ -750,7 +750,12 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase,
|
|||||||
{
|
{
|
||||||
wxFileName fullname(dirbase, filename);
|
wxFileName fullname(dirbase, filename);
|
||||||
wxMimeTextFile file;
|
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"),
|
wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"),
|
||||||
fullname.GetFullPath().c_str());
|
fullname.GetFullPath().c_str());
|
||||||
@@ -935,7 +940,14 @@ void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirname,
|
|||||||
void wxMimeTypesManagerImpl::LoadKDEApp(const wxString& filename)
|
void wxMimeTypesManagerImpl::LoadKDEApp(const wxString& filename)
|
||||||
{
|
{
|
||||||
wxMimeTextFile file;
|
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());
|
wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"), filename.c_str());
|
||||||
|
|
||||||
// Here, only type 'Application' should be considered.
|
// Here, only type 'Application' should be considered.
|
||||||
|
Reference in New Issue
Block a user