From 4dc9a1509a902dd23c28bf4cdd7cd1aede15b94e Mon Sep 17 00:00:00 2001 From: Richard Fairhurst Date: Fri, 20 Sep 2024 17:22:04 +0100 Subject: [PATCH] Default encoding UTF-8 (#742) --- src/mbtiles.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mbtiles.cpp b/src/mbtiles.cpp index 9aea0e37..d116ba5f 100644 --- a/src/mbtiles.cpp +++ b/src/mbtiles.cpp @@ -33,6 +33,11 @@ void MBTiles::openForWriting(string &filename) { } catch(runtime_error &e) { cout << "Couldn't write SQLite application_id (not fatal): " << e.what() << endl; } + try { + db << "PRAGMA encoding = 'UTF-8';"; + } catch(runtime_error &e) { + cout << "Couldn't set SQLite default encoding (not fatal): " << e.what() << endl; + } try { db << "PRAGMA journal_mode=OFF;"; } catch(runtime_error &e) {