diff --git a/NEWS.md b/NEWS.md index 86316d90..a0cbbe07 100644 --- a/NEWS.md +++ b/NEWS.md @@ -28,6 +28,7 @@ Red Panda C++ Version 2.26 - fix: Crash if include a non-exist header file in the source. - fix: Line numbers for problem case input/output/expected texteditors are not vertically centered. - enhancement: E-ink color scheme. + - fix: Use the system default encoding for input when running problem cases. Red Panda C++ Version 2.25 diff --git a/RedPandaIDE/compiler/ojproblemcasesrunner.cpp b/RedPandaIDE/compiler/ojproblemcasesrunner.cpp index 67b11a7c..3dc7c58e 100644 --- a/RedPandaIDE/compiler/ojproblemcasesrunner.cpp +++ b/RedPandaIDE/compiler/ojproblemcasesrunner.cpp @@ -107,7 +107,7 @@ void OJProblemCasesRunner::runCase(int index,POJProblemCase problemCase) if (fileExists(problemCase->inputFileName)) process.write(readFileToByteArray(problemCase->inputFileName)); else - process.write(problemCase->input.toUtf8()); + process.write(problemCase->input.toLocal8Bit()); process.waitForFinished(0); }