Preserve UTF-8 encoding when reading namedsearches.xml config file (#3145)

Fixes #3143
This commit is contained in:
Alejandro Martinez
2019-08-20 13:23:00 -03:00
committed by GitHub
parent e68afa6aea
commit 39b01c2649

View File

@@ -51,10 +51,8 @@ static QString protect(const QString string)
// Un-Escape special characters (JSON compliance)
static QString unprotect(const QString string)
{
QString string2 = QString::fromLocal8Bit(string.toLatin1().data());
// this is a quoted string
QString s = string2.mid(1,string2.length()-2);
QString s = string.mid(1,string.length()-2);
// now un-escape the control characters
s.replace("\\t", "\t"); // tab