Bug 495939 - database regional setting UTF8 versus UTF16SE
Summary: database regional setting UTF8 versus UTF16SE
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Sqlite (show other bugs)
Version: 8.4.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-07 20:38 UTC by Mir-123
Modified: 2024-11-08 06:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
SQL PRAGMA encoding UTF16SE versus Lokale UTF8 (179.31 KB, image/png)
2024-11-07 23:13 UTC, Mir-123
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mir-123 2024-11-07 20:38:19 UTC
Why are different regional settings displayed when accessing the same database and database under Help “Database statistics when accessing from Ubuntu and SteamdeckOS? In Ubuntu (Digikamvers. 7.5.0) under database regional setting UTF8 and when accessing via SteamdeckOS (Digikamvers. 8.4.0) UTF16LE. 
The Steam Deck uses SteamOS 3.0 as operating system, which is based on Arch Linux and uses KDE Plasma 5 as desktop environment. 
The aim of my question is that I want to access the QSQLite digicam database alternately from both systems. Unfortunately, this constellation results in messages when starting Digikan due to the different regional settings.
I wanted to avoid the problem by using Digikam as an app image and then using the same version. This should also work with different Linux versions. Is it normal if the database regional setting is still UTF16LE in the database?
Comment 1 Maik Qualmann 2024-11-07 20:57:48 UTC
We do not set PRAGMA encoding parameters to a SQLite DB. We use the system default. PRAGMA encoding cannot be changed after the DB is created. All operating systems, including Windows or macOS, use the SQLite default UTF-8.
Your two systems use different system settings.

Maik
Comment 2 Mir-123 2024-11-07 23:13:30 UTC
Created attachment 175632 [details]
SQL PRAGMA encoding UTF16SE versus Lokale UTF8
Comment 3 Mir-123 2024-11-07 23:16:23 UTC
Thank you for the information. The facts have become a little clearer to me. 
In the DB Browser for SQLite program, the entry UTF-8 is output as the value in the table under settings for keyword locale. Similarly, in the same database using SQL PRAGMA encoding; UTF-16le is output. This apparently caused Digikam to get confused and this constellation resulted in messages when Digikan was started. 
If I have understood you correctly, however, the SQL PRAGMA encoding; query is decisive for the database and the settings for keyword locale (which can theoretically also be changed via the database) are probably only important as a display function.
Comment 4 Maik Qualmann 2024-11-08 06:50:37 UTC
Correct, the locale in the DB is the last used database PRAGMA encoding.
If this has changed, digiKam will provide the information about it.

Maik