comparison data/fileio/TextTest.cpp @ 1861:9219834e39a4

Merge
author Chris Cannam
date Thu, 21 May 2020 16:09:46 +0100
parents 4c5736a517e0
children
comparison
equal deleted inserted replaced
1860:edc2d0e635dc 1861:9219834e39a4
38 return false; 38 return false;
39 } 39 }
40 40
41 QByteArray bytes = file.read(200); 41 QByteArray bytes = file.read(200);
42 42
43 if (StringBits::isValidUtf8(bytes.toStdString(), true)) { 43 if (StringBits::isValidUtf8(std::string(bytes.data()), true)) {
44 SVDEBUG << "NOTE: TextTest::isApparentTextDocument: Document appears to be UTF-8" << endl; 44 SVDEBUG << "NOTE: TextTest::isApparentTextDocument: Document appears to be UTF-8" << endl;
45 return true; // good enough to be worth trying to parse 45 return true; // good enough to be worth trying to parse
46 } 46 }
47 47
48 QXmlInputSource xmlSource; 48 QXmlInputSource xmlSource;