diff --git a/src/Mod/Start/Gui/StartView.cpp b/src/Mod/Start/Gui/StartView.cpp index bac26ed6c3..432c469bea 100644 --- a/src/Mod/Start/Gui/StartView.cpp +++ b/src/Mod/Start/Gui/StartView.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -388,7 +389,9 @@ void StartView::postStart(PostStartBehavior behavior) const void StartView::fileCardSelected(const QModelIndex& index) { auto file = index.data(static_cast(Start::DisplayedFilesModelRoles::path)).toString(); - auto command = std::string("FreeCAD.loadFile('") + file.toStdString() + "')"; + std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(file.toStdString().c_str()); + escapedstr = Base::Tools::escapeEncodeFilename(escapedstr); + auto command = std::string("FreeCAD.loadFile('") + escapedstr + "')"; try { Base::Interpreter().runString(command.c_str()); postStart(PostStartBehavior::doNotSwitchWorkbench);