Bug 209426 - konqueror image gallery creator has problems with umlauts in comments file
Summary: konqueror image gallery creator has problems with umlauts in comments file
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kimgalleryplugin (show other bugs)
Version: 4.3.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-04 18:29 UTC by Tobias Jochmann
Modified: 2011-11-19 17:31 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Jochmann 2009-10-04 18:29:26 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Fedora RPMs

How reproducible: create a image gallery with a comment file. The comment file has
to contain umlauts like ö,ü,ä


Steps to Reproduce:
1. create a comment file which contains ä ö ü
2. create a image gallery with this comment file


Actual results:
In the generated html file instead of ä ö ü  i see ä ö ü


Expected results:
it should show me ä ö ü
Comment 1 Raphael Kubo da Costa 2009-10-04 19:49:35 UTC
Actually, this doesn't have anything to do with Ark. What program were you running and what steps did you take to create that gallery?
Comment 2 Tobias Jochmann 2009-10-05 19:48:07 UTC
Sorry, accidently i assigned it to ark.
I ran konqueror. Above i wrote the steps how to create the gallery. Important is only the comments option. Every other adjustment on how to create the gallery doesn´t matter.
Comment 3 Raphael Kubo da Costa 2009-10-05 19:55:30 UTC
Thanks for the information. I'm finally reassigning it to the appropriate product and component.
Comment 4 Tobias Jochmann 2010-10-27 20:26:34 UTC
Hey Guys,
any updates on this?
This issue still exists in KDE 4.4.5
Comment 5 Burkhard Lück 2011-06-12 13:30:55 UTC
This one liner patch fixes this bug for me:

diff --git a/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp b/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp
index fa80eb3..2ce0a1b 100644
--- a/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp
+++ b/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp
@@ -238,7 +238,7 @@ void KImGalleryPlugin::createBody(QTextStream& stream, const QString& sourceDirN
             }
 
             if (m_useCommentFile) {
-                QString imgComment = (*m_commentMap)[imgName].toLocal8Bit();
+                QString imgComment = (*m_commentMap)[imgName].toLatin1();
                 stream << "<div>" << Qt::escape(imgComment) << "</div>" << endl;
             }
             stream << "</td>" << endl;
Comment 6 Raphael Kubo da Costa 2011-06-12 21:10:48 UTC
Hmm, it looks like the code was similar to that 9 years ago when r143851 changed it so that local8Bit() was used instead of latin1().

I think your patch can safely go in without .toLatin1(), just use (*m_commentMap)[imgName]. Please remove the toLocal8Bit() calls in loadCommentFile() too.
Comment 7 Burkhard Lück 2011-06-12 22:02:38 UTC
Git commit f5a4f96df01ddcf32fdc0be01d557e85d66bfca3 by Burkhard Lück.
Committed on 12/06/2011 at 22:01.
Pushed by lueck into branch 'KDE/4.6'.

use proper encoding to allow umlauts (äöü etc) in comments file, approved by rkcosta
BUG:209426

M  +2    -2    konq-plugins/kimgalleryplugin/imgalleryplugin.cpp     

http://commits.kde.org/kde-baseapps/f5a4f96df01ddcf32fdc0be01d557e85d66bfca3
Comment 8 Raphael Kubo da Costa 2011-06-12 22:15:09 UTC
SVN commit 1236355 by rkcosta:

Start the 4.6.5 changelog mentioning bug 209426.

CCBUG: 209426


 M  +8 -0      changelog_branch_4_6.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1236355