mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
feat: decode program dicts as UTF-8 instead of local8bit (#1821)
Some checks failed
SonarCloud / Build and analyze (push) Has been cancelled
Some checks failed
SonarCloud / Build and analyze (push) Has been cancelled
This commit is contained in:
parent
ef57526762
commit
40670d8197
|
@ -200,7 +200,7 @@ void RunInstance::handleProcessFinished()
|
||||||
QByteArray err = process.readAllStandardError();
|
QByteArray err = process.readAllStandardError();
|
||||||
|
|
||||||
if ( !err.isEmpty() ) {
|
if ( !err.isEmpty() ) {
|
||||||
error += "\n\n" + QString::fromLocal8Bit( err );
|
error += "\n\n" + QString::fromUtf8( err );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,8 +252,8 @@ void ProgramDataRequest::instanceFinished( QByteArray output, QString error )
|
||||||
prog_output = QString::fromUtf8( output.data() + 3, output.length() - 3 );
|
prog_output = QString::fromUtf8( output.data() + 3, output.length() - 3 );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// No BOM, assume local 8-bit encoding
|
// No BOM, assume UTF-8 encoding
|
||||||
prog_output = QString::fromLocal8Bit( output );
|
prog_output = QString::fromUtf8( output );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( std::exception & e ) {
|
catch ( std::exception & e ) {
|
||||||
|
|
Loading…
Reference in a new issue