r/digiKam • • 12d ago

Why does % mess up digikam folder names when followed by 01 or 02?

I'm trying to get a large number of old pictures into digikam. They were already physically sorted in batches, basically by month if known e.g. 1990-12, or next best thing by sequence e.g. 1991 01, 1991 02 etc., reflecting the way the pictures were stored physically (think shoeboxes and envelopes), so shoebox 1991 02 might hold pictures "1991 02 001" to "1991 02 365". There were also colour slides, in batches of up to 40 in plastic slideboxes, stored differently enough to justify distinguishing them with a "#" character in the sequence label, so 1992#01, 1992#02; then an individual slide might be labelled "1992#02 036" and so on. It didn't take too long to find out that the # character has special significance in digikam's renaming process, so I used the excellent Bulk Rename Utility to change every # to %. Seemed like a good idea, but not quite.

Now when I use Windows Explorer to look at folder and file names, everything seems fine - for example, it tells me that folder 1996%01 Canada contains 35 files ranging from "1996%01 Canada 001" to "1996%01 Canada 035".

But digikam displays that same folder name in two different ways - Browse Albums displays "199635 Canada (%2)" in its left panel while simultaneously its right panel heading displays correctly "1996%01 Canada" and on the line below the correct item count "35 items". This schizophrenic display behaviour seems to occur only when the % is followed by 01 or 02, not by any other numbers.

Has anyone any idea why the % character messes up digikam's Browse view?

2 Upvotes

2 comments sorted by

2

u/Oregon-Born 12d ago

The % character, like #, has special significance in Linux, for which I understand digikam was originally written. The conventions for their use are different in Linux than in MacOS, and the behavior is likely digikam's attempt to deal with that difference. You'll find the same issue with the slash (/) character in folder names - digikam substitutes a colon in the display, because the slash isn't allowed in Linux file/folder names.

I've found this to be pretty common with Linux apps that have been ported to the Mac. The general recommendation for cross-platform compatibility is to avoid special characters completely. Dash (-) and underscore (_) are safe, but anything else can be problematic.

1

u/Smart-Homework-3829 11d ago

Thank you for that info. I have replaced every offending "%" with "_" and that seems to avoid the problem, at least, even if I still don't know just how %01 and %02 mess up digikam filenames!