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

--- Comment #9 from man...@wenns-um-email-geht.de ---
If Windows would use UTF-8 it would indeed solve the issue. But only if QT
recognizes that. digikam just gets the QTextCodec of the current locale
(QTextCodec::codecForLocale()) and then uses its name as the encoding name. So
QT would need to return the UTF-8 QTextCodec on Windows systems instead of the
"System" one when Windows is set up to UTF-8. Hopefully that's the case then ;)

But what I was trying to say:
For now, if it is just you who has access to your database and all your systems
support the same characters (for example all your operating systems are set up
to the same language), then it doesn't matter what encoding each system uses.
QT should take care of correctly decode, e.g. file and folder names, according
to the system's character encoding. The results are QStrings (unicode strings)
which are then used by digikam and saved using UTF-8 encoding in the database.
Let's say you have file/folder names containing special characters. When they
are retrieved from the database, the UTF-8 strings are turned back into unicode
QStrings. And when accessing the file, QT can use the system's character
encoding to get the correctly encoded path string for the current system.
At least that is my understanding from looking at the code and QT docs. But
again, I am not a cpp or QT developer ;) I am a little bit unsure especially
about the database part: I see that the table schemas are fixed to UTF-8, but I
do not know if QT's MySQL driver uses that information when encoding/decoding
QStrings (but I would expect it, and in my case everything works fine so far :)
) Can somebody confirm this?

However, if you have a database with a lot of different users using very
different systems and potentially completely different character encodings,
then of course, problems have to be expected. That is why I suggest an "do not
show again" checkbox for the message box ;) It would be easy to implement.

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

Reply via email to