https://bugs.kde.org/show_bug.cgi?id=382362

--- Comment #6 from man...@wenns-um-email-geht.de ---

Yes, UTF-8 covers umlauts and of course any other unicode character.

I took closer look at the code. Since digikam uses QT it already uses unicode
strings. Digikam’s database schema for MySQL is hardcoded to UTF-8. For the
data that comes into the app the system’s character encoding is used. So any
"incoming" data is turned into unicode strings and stored using UTF-8 encoding
in the database. (correct me if I am wrong - I am a programmer, but not using
cpp at all :) )

What digikam now does is that it stores the name of the system’s character
encoding in the database. During startup it compares the current encoding to
the one stored in the database and shows a warning in case they differ.
On MacOS a real encoding name like "UTF-8" is detected, while on Windows only
"System" is returned (see:
https://doc.qt.io/qt-5/qtextcodec.html#codecForLocale ) and
MultiByteToWideChar/WideCharToMultiByte is used (see
https://wiki.qt.io/QtTextCodec).
Although the warning informs about a potential problem, it might be totally
fine to use different encodings across multiple systems as long as only
characters are used which are supported by both. The warning message actually
says something similar. In the end, strings are stored as UTF-8 in the MySQL
database.

And this is probably the use case people usually have when accessing digikam’s
MySQL database from multiple systems: they use different systems with different
encodings (like when using digikam on Windows and MacOS), but still use the
same characters, because both systems are probably run using the same language,
let’s say German where umlauts are frequently used. It doesn’t matter that both
systems use different encodings as long as the used characters are supported by
both encodings.
A problem can only arise if a user uses two systems with two different
encodings and then use characters that cannot be encoded by one of the
encodings. For example, one system supports only pure ASCII and on the second
system Chinese characters are used.

So, what we actually need is a "don’t show this message again - I know what I
am doing" checkbox for the warning message box. Forcing some encoding is IMHO
unnecessary.

For me, I just removed that part showing the message box and compiled my own
version, because I know that I will run digikam on different platforms using
different encodings, but I also know that I will stick to the same language and
use the same characters on all systems. So I am happy now, but I would be glad
to see some official effort here :)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to