Binary detection: end-of-line characters where not treated as text

Fixes 5e0c56a47f

See issue #1201
This commit is contained in:
mgrojo
2021-01-03 18:02:27 +01:00
parent 576bbe7ef5
commit fb7248b75d
+1 -1
View File
@@ -49,7 +49,7 @@ bool isTextOnly(QByteArray data, const QString& encoding, bool quickTest)
QString text (data);
bool isPrintable = true;
for(QChar character : text) {
if(!character.isPrint()) {
if(character.isNonCharacter() || (character.category() == QChar::Other_Control && !character.isSpace())) {
isPrintable = false;
break;
}