From 5aff1c9188d99ed670a4bc67ee7fd83ba0bcf82d Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 21 May 2019 15:44:49 +0200 Subject: [PATCH] handle eventual system error messages --- src/Gui/Application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 73dbad52f0..5c2451b86a 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1180,7 +1180,7 @@ bool Application::activateWorkbench(const char* name) } catch (Py::Exception&) { Base::PyException e; // extract the Python error text - QString msg = QString::fromLatin1(e.what()); + QString msg = QString::fromUtf8(e.what()); QRegExp rx; // ignore '' prefixes rx.setPattern(QLatin1String("^\\s*:\\s*")); @@ -1190,7 +1190,7 @@ bool Application::activateWorkbench(const char* name) pos = rx.indexIn(msg); } - Base::Console().Error("%s\n", (const char*)msg.toLatin1()); + Base::Console().Error("%s\n", (const char*)msg.toUtf8()); if (!d->startingUp) Base::Console().Error("%s\n", e.getStackTrace().c_str()); else