fix unicode issue on tab of StartPage

This commit is contained in:
wmayer
2019-03-10 11:03:45 +01:00
parent c6e8d688db
commit e336d3f1aa
2 changed files with 21 additions and 7 deletions

View File

@@ -44,6 +44,7 @@
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Interpreter.h>
#include <Base/Tools.h>
#include <Mod/Start/App/StartConfiguration.h>
@@ -71,6 +72,7 @@ void StartGui::Workbench::activated()
try {
QByteArray utf8Title = title.toUtf8();
std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(utf8Title);
QByteArray cmd;
QTextStream str(&cmd);
str << "import WebGui,sys,Start" << endl;
@@ -78,7 +80,7 @@ void StartGui::Workbench::activated()
str << endl;
str << "class WebPage(object):" << endl;
str << " def __init__(self):" << endl;
str << " self.browser=WebGui.openBrowserWindow('" << utf8Title << "')" << endl;
str << " self.browser=WebGui.openBrowserWindow(u'" << escapedstr.c_str() << "')" << endl;
#if defined(FC_OS_WIN32)
str << " self.browser.setHtml(StartPage.handle(), App.getResourceDir() + 'Mod/Start/StartPage/')" << endl;
#else