[Bug 195006] New: national charaters not accepted in database file path

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006





--- Comment #18 from Andrzej <superandrzej epf pl>  2012-01-22 23:43:44 ---
there is no kdebugdialog.
The:
digikam(1786)/digikam (core): Error while opening the database. Error details [
QSqlError(-1, "Błąd podczas otwierania bazy danych", "unable to open database
file") ]
error is the first message being displayed.

I've compiled digiKam with -DCMAKE_BUILD_TYPE=Release.
I will compile digiKam with more debug info.

I'll let you know.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Gilles Caulier-4
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006





--- Comment #19 from Gilles Caulier <caulier gilles gmail com>  2012-01-23 07:49:30 ---
kdebugdialog is a program from KDE :

http://www.youtube.com/watch?v=uw8FdebrIJs

You need to install it on your system...

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Bugzilla from superandrzej@epf.pl
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006





--- Comment #20 from Andrzej <superandrzej epf pl>  2012-01-25 07:52:12 ---
Created an attachment (id=68155)
 --> (http://bugs.kde.org/attachment.cgi?id=68155)
konsole output

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Bugzilla from superandrzej@epf.pl
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006





--- Comment #21 from Andrzej <superandrzej epf pl>  2012-01-25 07:59:31 ---
50003 was enabled in kdebugdialog.
I also compiled with -DCMAKE_BUILD_TYPE=relwithdebinfo.
But output is the same.

when I click on "cancel" there is plenty o repeated messages like below:

QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL3 QMYSQL
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL3 QMYSQL
QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-168059104' is
still in use, all queries will cease to work.
QSqlDatabasePrivate::addDatabase: duplicate connection name
'digikamDatabase-168059104', old connection removed.
QSqlQuery::prepare: database not open
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL3 QMYSQL
QSqlQuery::prepare: database not open
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL3 QMYSQL
QSqlQuery::prepare: database not open
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL3 QMYSQL
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL3 QMYSQL

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Bugzilla from superandrzej@epf.pl
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006





--- Comment #22 from Andrzej <superandrzej epf pl>  2012-02-27 21:54:22 ---
Marcel,

I compiled with -DCMAKE_BUILD_TYPE=debugfull and I have the output you asked
for.
the paths are displayed OK:
-> digikam
digikam(2426)/digikam (core) Digikam::KInotify::Private::open: Successfully
opened connection to inotify: 10
digikam(2426)/digikam (core) Digikam::AlbumManager::setDatabase:
DatabaseParameters: [ Type "QSQLITE", Name "/D/zdjęcia/digikam4.db" (Thumbnails
Name "/D/zdjęcia/thumbnails-digikam.db"); ]

still digiKam is looking for database in nonexistent location because of wrong
encoding.

Andrzej

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Marcel Wiesweg
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006





--- Comment #23 from Marcel Wiesweg <marcel wiesweg gmx de>  2012-03-01 20:46:28 ---
"/D/zdjęcia/digikam4.db" seems to be the correct file name, and this one is
read from the config file and passed as UTF-8 to the Qt SQL driver.
Well, I cannot find out from here where exactly something is wrong.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Bugzilla from superandrzej@epf.pl
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

Andrzej <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|Other                       |Compiled Sources
            Version|2.4.1                       |2.6.0

--- Comment #24 from Andrzej <[hidden email]> ---
Marcel,

Database file name is read correctly from the config file but it it seems that
it shouldn't be passed as UTF-8 to the Qt SQL driver but depending on locale
settings because Qt SQL driver seems to be using it directly without taking
locale settings in to account.

As I mentioned before:
To confirm this I created symlink to /D/zdjęcia/ called /D/zdjęcia/ and
digiKam i.e  Qt SQL driver had no problem in finding the location.

So the solution should be to pass the database path to Qt SQL driver depending
on locale settings i.e. on UTF-8 systems settings it should be passed as UTF-8
but
on ISO 8859-2 systems it should be passed as ISO 8859-2.

I know that digiKam is checking what are locale settings so this information is
already available.

Andrzej

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Marcel Wiesweg
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

--- Comment #25 from Marcel Wiesweg <[hidden email]> ---
If you have a look at
http://sqlite.org/c3ref/open.html
passing the filename as UTF-8 to sqlite_open_v2 is explicitly required, any
other attempt would be a violation of the API documentation. See the note at
the bottom of the page, even though it is only directed at Windows users: "The
encoding used for the filename argument of sqlite3_open() and sqlite3_open_v2()
must be UTF-8, not whatever codepage is currently defined. Filenames containing
international characters must be converted to UTF-8 prior to passing them into
sqlite3_open() or sqlite3_open_v2()"

This is what I mean: we have a 100% unicode passthrough of the filename through
digikam and Qt, and obviously the data we have in digikam is correct.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Bugzilla from superandrzej@epf.pl
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

--- Comment #26 from Andrzej <[hidden email]> ---
Requirement that: "The encoding used for the filename argument of
sqlite3_open() and sqlite3_open_v2() must be UTF-8" is from sqlite.

As far as understand there is an intermediary between digiKam and sqlite: Qt
SQL driver.

Maybe Qt SQL driver does not have this requirement and non UTF-8 encoding can
be passed.

The error message suggest that it is Qt SQL driver that is confused.

Which element should checked system locale and access database file
accordingly?
Qt SQL driver or sqlite?

Either database path is provided as UTF-8 and then converted to local setting
encoding by the element accessing database
or it should be possible to provide database path also as non UTF-8 if no
locale settings are checked afterwards

Andrzej

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Marcel Wiesweg
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

--- Comment #27 from Marcel Wiesweg <[hidden email]> ---
qsql_slite.cpp:508
bool QSQLiteDriver::open(const QString & db, const QString &, const QString &,
const QString &, int, const QString &conOpts)
...
    if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL) ==
SQLITE_OK) {
...

QString is UTF-16 internally. So if the QString we pass in the beginning is
correct Unicode, it is not changed in any way I can see. This is what I mean by
100% unicode.
Obviously something goes wrong, but I dont know where and particularly, I dont
know what we could change.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 195006] national charaters not accepted in database file path

Gilles Caulier-4
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |2.0.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[kdelibs] [Bug 195006] SQLITE : UTF8 characters not accepted in database file path (digiKam)

Gilles Caulier-4
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Database                    |qt
   Version Fixed In|2.0.0                       |
            Summary|national charaters not      |SQLITE : UTF8 characters
                   |accepted in database file   |not accepted in database
                   |path                        |file path (digiKam)
            Version|2.6.0                       |unspecified
           Assignee|[hidden email]       |[hidden email]
            Product|digikam                     |kdelibs

--- Comment #28 from Gilles Caulier <[hidden email]> ---
We suspect a low problem to Qt sqlite plugin...

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 195006] SQLITE : UTF8 characters not accepted in database file path (digiKam)

Gilles Caulier-4
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Product|kdelibs                     |digikam
   Version Fixed In|                            |4.3.0
           Assignee|[hidden email]        |[hidden email]
          Component|qt                          |Database

--- Comment #30 from Gilles Caulier <[hidden email]> ---
Thanks Christoph for your feedback.

I move back this file into digiKam, for archiving purpose.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 195006] SQLITE : UTF8 characters not accepted in database file path

Gilles Caulier-4
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|SQLITE : UTF8 characters    |SQLITE : UTF8 characters
                   |not accepted in database    |not accepted in database
                   |file path (digiKam)         |file path

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 195006] SQLITE : UTF8 characters not accepted in database file path

bugzilla_noreply
In reply to this post by Bugzilla from superandrzej@epf.pl
https://bugs.kde.org/show_bug.cgi?id=195006

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Database                    |Database-Sqlite

--
You are receiving this mail because:
You are the assignee for the bug.
12