diff --git a/NEWS.md b/NEWS.md index 30c59957..6b7e34a5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -17,6 +17,7 @@ Red Panda C++ Version 2.17 - enhancement: Shift+Up in the first line will expand selection to the beginning of the line. - enhancement: Shift+Down in the last line will expand selection to the end of the line. - enhancement: If no selection, Ctrl+C (Copy) auto selects the current line and put the cursor to the beginning. + - fix: Chinese characters in the source code is not correctly displayed in the CPU info window. Red Panda C++ Version 2.16 diff --git a/RedPandaIDE/debugger.cpp b/RedPandaIDE/debugger.cpp index afed0b89..21c83965 100644 --- a/RedPandaIDE/debugger.cpp +++ b/RedPandaIDE/debugger.cpp @@ -1082,7 +1082,8 @@ void DebugReader::processConsoleOutput(const QByteArray& line) p++; } } - mConsoleOutput.append(QString::fromLocal8Bit(stringValue)); + //mConsoleOutput.append(QString::fromLocal8Bit(stringValue)); + mConsoleOutput.append(QString::fromUtf8(stringValue)); } } @@ -1242,7 +1243,7 @@ void DebugReader::processResultRecord(const QByteArray &line) processResult(result); } else if (mCurrentCmd && !(mCurrentCmd->command.startsWith('-'))) { if (mCurrentCmd->command == "disas") { - QStringList disOutput = mConsoleOutput; + QStringList disOutput = mConsoleOutput; if (disOutput.length()>=3) { disOutput.pop_back(); disOutput.pop_front();