
Unf: UNixize Filename – replace annoying anti-Unix characters in filenames - io12
https://github.com/io12/unf
======
dredmorbius
Standardising file extensions to lowercase and short forms might be a useful
option;

    
    
        JPG -> jpg
        jpeg -> jpg
        

I'm not aware of file extensions conventionally presented as mixed case,
though ePub might be a possible case.

Does this handle collisions in generated names?

~~~
ksaj
Amen. The Mac goes one level wonkier by allowing file names to visually appear
mixed-case, but treats them as if they're upper/lower only one way.

For example, Thing.JPG, thing.jpg, THING.Jpg are all the same file name even
though under Linux they would not be.

I didn't look, but does unf check to make sure renaming Spaced Filename.txt to
Spaced_Filename.txt check that it isn't clobbering a pre-existing
Spaced_Filename.txt and offer a different remediation? Bulk collisions could
be very messy.

