Skip to content

Commit 4dc9a15

Browse files
authored
Default encoding UTF-8 (#742)
1 parent 28d7e99 commit 4dc9a15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mbtiles.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ void MBTiles::openForWriting(string &filename) {
3333
} catch(runtime_error &e) {
3434
cout << "Couldn't write SQLite application_id (not fatal): " << e.what() << endl;
3535
}
36+
try {
37+
db << "PRAGMA encoding = 'UTF-8';";
38+
} catch(runtime_error &e) {
39+
cout << "Couldn't set SQLite default encoding (not fatal): " << e.what() << endl;
40+
}
3641
try {
3742
db << "PRAGMA journal_mode=OFF;";
3843
} catch(runtime_error &e) {

0 commit comments

Comments
 (0)