------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=152877 Summary: thumbnails: URI does not follow Thumbnail Managing Standard Product: digikam Version: 0.9.2 Platform: SuSE RPMs OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general AssignedTo: digikam-devel kde org ReportedBy: heiko.schroeder t-online de Version: 0.9.2 (using KDE KDE 3.5.4) Installed from: SuSE RPMs OS: Linux Characters in file or directory names are converted to Latin-1 by digikam. The resulting names are then used to form the Thumb::URI tag for thumbnails. According to the Thumbnail Managing Standard the URI should be formed using the octet sequence that is actually used by the filesystem (in my case UTF-8) so that it can be used to access the file. According to RFC2396 (which is referenced by the TMS) an URI may only contain US-ASCII characters, octets that are not part of the US-ASCII set have to be escaped using the "%<hex>" syntax. digikam uses the unescaped Latin-1 octets instead. As other programs (e.g. konqueror) follow the standard, two thumbnail files may be generated for the same file using different URIs. Addtionally, the re-encoding may fail for characters that cannot be represented in this character set, leading to wrong or incomplete URIs. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=152877 ------- Additional Comments From heiko.schroeder t-online de 2007-11-25 15:45 ------- Accidently selected the wrong KDE version: It's 3.5.7 (using openSUSE 10.3). _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from heiko.schroeder@t-online.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=152877 caulier.gilles gmail com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|general |Thumbnails _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from heiko.schroeder@t-online.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=152877 arnd.baecker web de changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|NOR |HI ------- Additional Comments From arnd.baecker web de 2007-11-26 08:44 ------- Hi Heiko, thanks for the report, I set the priority to high. The places I found, where the actual path to the thumbnails is constructed, are I think that this is an important issue.digikam/pixmapmanager.cpp: uri = md5.hexDigest(); kioslave/digikamthumbnail.cpp: thumbPath += QFile::encodeName( md5.hexDigest() ) + ".png"; libs/thumbbar/thumbbar.cpp: uri = md5.hexDigest(); utilities/batch/batchthumbsgenerator.cpp: uri = md5.hexDigest(); Are these all? The code usually looks like QString uri = "file://" + QDir::cleanDirPath(url.path()); KMD5 md5(QFile::encodeName(uri)); uri = md5.hexDigest(); QString smallThumbPath = d->thumbCacheDir + "normal/" + uri + ".png"; So the encodeName should be replaced, but I am not familiar with the hex encoding. One way might be something like QString hex; hex.sprintf("%%%02X", uri); (I am not sure about the first argument of sprintf ...) Heiko, do you maybe have the pointer to the source code which konquerer uses? _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from heiko.schroeder@t-online.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=152877 ------- Additional Comments From heiko.schroeder t-online de 2007-11-26 10:13 ------- Hi, I must admit, I didn't even look at the code... I wrote a perl script to cleanup my .thumbnails directory and noticed that some URIs contained Latin-1 characters while my filesystems are in UTF-8. For the same file there ususally was another entry using the hex-encoded URI. Checking the Software tag revealed the producers (digikam vs. konqueror). For the encoding: I'm afraid I can't help you much with the real code (I am not familiar with Qt), but generally: You have to replace all characters outside the US-ASCII range with the hex code (using capital letters) prefixed by "%". So your format string looks right, but of course it has to be applied only to those characters that are outside US-ASCII set (and before converting the path to Latin-1). And it's not just MD5 code for the thumbnail that is affected. The Thumb::URI tag written to the thumbnail file has to be encoded correctly, too. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |