Use C locale codec for decoding

This should correctly decode multi-byte non-UTF-8 text, such as Windows-936 (Simplified Chinese)

Signed-off-by: Mitchell Skaggs <skaggsm333@gmail.com>
This commit is contained in:
Mitchell Skaggs 2022-08-13 10:39:05 -05:00
parent 94df4ceb36
commit 3c4b45c9e7
No known key found for this signature in database
GPG Key ID: 4EB0FECB84AE8967

View File

@ -89,8 +89,8 @@ private:
void changeState(LoggedProcess::State state); void changeState(LoggedProcess::State state);
private: private:
QTextDecoder m_err_decoder = QTextDecoder(QTextCodec::codecForName("UTF-8")); QTextDecoder m_err_decoder = QTextDecoder(QTextCodec::codecForLocale());
QTextDecoder m_out_decoder = QTextDecoder(QTextCodec::codecForName("UTF-8")); QTextDecoder m_out_decoder = QTextDecoder(QTextCodec::codecForLocale());
bool m_killed = false; bool m_killed = false;
State m_state = NotRunning; State m_state = NotRunning;
int m_exit_code = 0; int m_exit_code = 0;