We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25bac8d commit afb2c43Copy full SHA for afb2c43
src/sqlitedb.cpp
@@ -209,15 +209,15 @@ bool DBBrowserDB::open(const QString& db, bool readOnly)
209
210
const char* encodingBytes = header.constData() + 56;
211
// The variable 'encoding' will have one of the following values:
212
- // 1: UTF-8, 2: UTF-16LE, 3: UTF-16BE
+ // SQLITE_UTF8, SQLITE_UTF16LE, SQLITE_UTF16BE (https://www.sqlite.org/fileformat.html#text_encoding)
213
quint32 encoding = ((quint8)encodingBytes[0] << 24) |
214
((quint8)encodingBytes[1] << 16) |
215
((quint8)encodingBytes[2] << 8) |
216
((quint8)encodingBytes[3]);
217
218
// Open database file
219
int status=0;
220
- if(encoding == 1)
+ if(encoding == SQLITE_UTF8)
221
{
222
status = sqlite3_open_v2(
223
db.toUtf8(),
0 commit comments