Summary: | utf8 not supported in "rename images" tool | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Romain Diss <romain.diss> |
Component: | AdvancedRename-dialog | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | agateau, caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: | |||
Attachments: | Do not assume locale charset is Latin1 |
Description
Romain Diss
2007-04-26 16:01:45 UTC
Can, This file still valid using kipi-plugins 0.1.6 ? Gilles Caulier (In reply to comment #1) > This file still valid using kipi-plugins 0.1.6 ? This bug still exist with kipi-plugins 0.1.6. Created attachment 30267 [details]
Do not assume locale charset is Latin1
Can you try attached patch? I've never done that before and I'm not sure to know the exact way to try this patch. Do you have some links which could briefly help me to know what are the sources I need to compile and how to apply this patch. (I'm using Debian Sid). On a Debian, the simplest way is to do it this way (from memory): # Install the needed packages - sudo apt-get install debuild - sudo apt-get build-dep kipi-plugins # Download the source package - mkdir foo - cd foo - apt-get source kipi-plugins (Creating a folder is a good idea because apt-get source will bring a few files) # Apply the patch - cd kipi-plugins-0.1.6 - patch -p1 < path/to/the/patch # Build the package - debuild # Install the package - cd .. - sudo dpkg -i kipi-plugins_0.1.6-1_i386.deb Thank you for the explanations. By trying to apply the patch, I realized a strange thing. When I had downloaded the kipi-plugins sources with aptitude, I got the kipi-kipi-plugins-0.1.5 version. I checked with "aptitude show kipi-plugins" that I have the 0.1.5 version installed. But when I go in the Digikam's "about" menu, it tells me that I'm using the 0.1.6. So for the moment, I did not managed to apply the patch. The error message I got is : "patching file kipi-plugins/batchprocessimages/renameimageswidget.cpp Hunk #1 FAILED at 446. 1 out of 1 hunk FAILED -- saving rejects to file kipi-plugins/batchprocessimages/renameimageswidget.cpp.rej" I suppose this is due to the version mismatch... What can I do now ? The patch is quite simple, you should be able to apply it manually to version 0.1.5: - Look for lines like this: ::strftime(s, 100, QFile::encodeName(format), time_tm); newName += QString::fromLatin1(s); And replace fromLatin1 with fromLocal8Bit. What I find difficult to understand however is the fact that Digikam says it's using version 0.1.6. Did you install Digikam and/or kipi-plugins by hand? SVN commit 913586 by gateau: Do not assume locale charset is Latin1. BUG: 144713 M +1 -1 renameimageswidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=913586 > And replace fromLatin1 with fromLocal8Bit.
I replaced fromLatin1 with fromLocal8Bit everywhere in all the files in kipi-plugins sources, not only those which look like this :
::strftime(s, 100, QFile::encodeName(format), time_tm);
newName += QString::fromLatin1(s);
I don't now if this should have side effects, but it works fine now !
Thank you for your help.
Do you think this bug should be marked closed ?
After a quick grep on the sources, it appears the other places where fromLatin1() is called it is called with constant ascii strings, so changing those calls to fromLocal8Bit() won't fix anything. Anyway, the bug is closed now, thanks for the report! |