From 6ed21609e4c5866b0d5ec2fc2bc06627dfc25de3 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 2 Dec 2017 19:37:05 +0100 Subject: [PATCH] issue #0002973: Path to FreeCAD.app can't contain unicode --- src/App/Application.cpp | 3 ++- src/App/FreeCADInit.py | 2 +- src/Gui/FreeCADGuiInit.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 81b16ae1f0..5847cf7810 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -2473,7 +2473,8 @@ std::string Application::FindHomePath(const char* sCall) #else QString str = QString::fromStdWString(homePath); #endif - return str.toStdString(); + // convert to utf-8 + return str.toUtf8().data(); } #else diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index e2e6cbcadc..bf0a1f24f3 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -140,7 +140,7 @@ def InitApplications(): Log(traceback.format_exc()) Log('-'*100+'\n') Err('During initialization the error ' + str(inst) + ' occurred in ' + InstallFile + '\n') - Err('Please look into the log file for further information') + Err('Please look into the log file for further information\n') else: Log('Init: Initializing ' + Dir + '... done\n') else: diff --git a/src/Gui/FreeCADGuiInit.py b/src/Gui/FreeCADGuiInit.py index 319e1d00a3..a6d746dca3 100644 --- a/src/Gui/FreeCADGuiInit.py +++ b/src/Gui/FreeCADGuiInit.py @@ -124,7 +124,7 @@ def InitApplications(): Log(traceback.format_exc()) Log('-'*100+'\n') Err('During initialization the error ' + str(inst) + ' occurred in ' + InstallFile + '\n') - Err('Please look into the log file for further information') + Err('Please look into the log file for further information\n') else: Log('Init: Initializing ' + Dir + '... done\n') else: