Hi
I don't know if this something Transliteration should handle, but I recently ran into a problem with a FTP server that did not list or transfer any files that had 2 consecutive periods in the filename.
EG: myfile..jpg
REF:
http://trac.filezilla-project.org/ticket/4211
UPDATE: 2011/10/06
Since #973926: Filename transliteration: Maximum one consecutive separator character shall appear in filename after the manipulations was marked as duplicate of this issue here, I'm copy-pasting its summary here as well...
When using the transliteration function for renaming files in the upload process, at most one consecutive separator character shall appear in filename after the manipulations such as omitting punctation or stopwords.
Original: Aaa + bb & cc @ dd • ee.txt
Result: aaa__bb__cc__dd__ee.txt
Expected: aaa_bb_cc_dd_ee.txt
Comments
Comment #1
smk-ka CreditAttribution: smk-ka commentedThe referenced issue has been found to be a bug with the used software. However, I've also seen multiple consecutive non-alphabetical characters like underscores etc. after cleaning the filename. There should at least be an option to normalize those. Something like
preg_replace('/(_)_+|(\.)\.+|(-)-+/', '\\1\\2\\3', $filename);
should do the trick.Comment #2
klonos...subscribing.
Comment #2.0
klonosSince #973926: Filename transliteration: Maximum one consecutive separator character shall appear in filename after the manipulations was marked as duplicate of this issue here, I'm copy-pasting its summary here as well...
Comment #3
amateescu CreditAttribution: amateescu commentedCommitted the snippet from #2 to 7.x-3.x and 6.x-3.x.
http://drupalcode.org/project/transliteration.git/commit/4795bd5
http://drupalcode.org/project/transliteration.git/commit/3616c90
Comment #4.0
(not verified) CreditAttribution: commentedReformat issue summary update