MCPcopy Create free account
hub / github.com/QNapi/qnapi / detectFileEncoding

Method detectFileEncoding

libqnapi/src/utils/encodingutils.cpp:168–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168QString EncodingUtils::detectFileEncoding(const QString &filename) const {
169 QFile f(filename);
170 if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
171 QString enc = detectBufferEncoding(f.readAll());
172 f.close();
173 return enc;
174 }
175 return "";
176}

Callers 4

convertSubtitlesMethod · 0.80

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected