- fix: File's real encoding is not correctly calculated when save it using system default encoding.
This commit is contained in:
parent
5f1aa5f620
commit
a51ac2fb63
1
NEWS.md
1
NEWS.md
|
@ -17,6 +17,7 @@ Red Panda C++ Version 2.19
|
|||
- fix: "Run all problem cases" with project is not correctly handled.
|
||||
- fix: When adding files to project and there'are duplicates, the warning info is not complete.
|
||||
- enhancement: Improve code completion suggestion for arrays.
|
||||
- fix: File's real encoding is not correctly calculated when save it using system default encoding.
|
||||
|
||||
Red Panda C++ Version 2.18
|
||||
|
||||
|
|
|
@ -778,7 +778,7 @@ void Document::saveToFile(QFile &file, const QByteArray& encoding,
|
|||
}
|
||||
if (allAscii) {
|
||||
realEncoding = ENCODING_ASCII;
|
||||
} else if (encoding == ENCODING_AUTO_DETECT) {
|
||||
} else if (realEncoding == ENCODING_SYSTEM_DEFAULT) {
|
||||
if (QString(codec->name()).compare("System",Qt::CaseInsensitive)==0) {
|
||||
realEncoding = pCharsetInfoManager->getDefaultSystemEncoding();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue