diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index d988aed649..661453e0e1 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -115,6 +115,9 @@ bool wxXmlResource::Load(const wxString& filemask) fn.MakeAbsolute(); fnd = fn.GetFullPath(); } +#if wxUSE_FILESYSTEM + fnd = wxFileSystem::FileNameToURL(fnd); +#endif } #if wxUSE_FILESYSTEM @@ -331,9 +334,9 @@ void wxXmlResource::UpdateResources() #if !wxUSE_UNICODE && wxUSE_INTL if ( (GetFlags() & wxXRC_USE_LOCALE) == 0 ) { - // In case we are not using wxLocale to translate strings, convert the strings - // GUI's charset. This must not be done when wxXRC_USE_LOCALE is on, because - // it could break wxGetTranslation lookup. + // In case we are not using wxLocale to translate strings, convert the + // strings GUI's charset. This must not be done when wxXRC_USE_LOCALE + // is on, because it could break wxGetTranslation lookup. encoding = wxLocale::GetSystemEncodingName(); } #endif diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index d988aed649..661453e0e1 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -115,6 +115,9 @@ bool wxXmlResource::Load(const wxString& filemask) fn.MakeAbsolute(); fnd = fn.GetFullPath(); } +#if wxUSE_FILESYSTEM + fnd = wxFileSystem::FileNameToURL(fnd); +#endif } #if wxUSE_FILESYSTEM @@ -331,9 +334,9 @@ void wxXmlResource::UpdateResources() #if !wxUSE_UNICODE && wxUSE_INTL if ( (GetFlags() & wxXRC_USE_LOCALE) == 0 ) { - // In case we are not using wxLocale to translate strings, convert the strings - // GUI's charset. This must not be done when wxXRC_USE_LOCALE is on, because - // it could break wxGetTranslation lookup. + // In case we are not using wxLocale to translate strings, convert the + // strings GUI's charset. This must not be done when wxXRC_USE_LOCALE + // is on, because it could break wxGetTranslation lookup. encoding = wxLocale::GetSystemEncodingName(); } #endif