I want to create a SQLite database through the python driver. As the application will run on different operating systems I want to explicitly specify the (default) encoding of text within the SQLite database.
Apparently I can only do this before a database is created with this command (see SQLite docs):
PRAGMA encoding = "UTF-8";
My problem is that the Python way to create/connect to a database does not specify (at least to my understanding) a way to set PRAGMAs (such as encoding) before the database is created (Python docs)
Is there therefore any way to specify the encoding through the python SQlite driver before/while a database is created?
The only workaround I currently see, which seems a bit hacky, is to run Shell commands through python, but since the SQLite CLI is not installed on the machines, this is no option.