diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 4ab6c3ee..f2a7b3e6 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -229,7 +229,7 @@ void Editor::loadFile(QString filename) { void Editor::saveFile(QString filename) { QFile file(filename); QByteArray encoding = mFileEncoding; - if (mFileEncoding==ENCODING_ASCII) + if (mEncodingOption!=ENCODING_AUTO_DETECT || mFileEncoding==ENCODING_ASCII) encoding = mEncodingOption; this->lines()->saveToFile(file,encoding, pSettings->editor().defaultEncoding(),