You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for file extensions using uppercase letters #251
I see that a few formats have definitions for upper and lowercase variants of the file extensions, although it seems like it would be more ideal to just convert the extension string to lower case when trying to figure out which format the file is in.
I find it bad style to support uppercase and lowercase extensions, which probably only a few extension vendors started doing. So I'm in favor of keeping this explicit for the few formats, that started allowing the uppercase version...
I don't think I agree. or at least not entirely.
File format when recogizing by extension (rather than magic byte) should be done in a case-insensitive way.
E.g. convert all of them to lower case before comparing.
Remembing that Windows historically uses a a case-insesitive file-system;
and also historically depended a lot more on the extension to decide what to do with a file.
In contrast to Unixen which has things like the shebang line to specfy interpretter.
I think it would be very weird to have a file extension that has to be in upper-case as the one way it is distinguished from another, simply because that wouldn't work in Windows.
Reacted by Johnny Chen, Milan Bouchet-Valat and kimikage
I ran into this issue with RData.jl. It not obvious to me (a Julia beginner) that capitalization of the file extension was the problem. I filed an issue at RData.jl (JuliaData/RData.jl#91).
This has been reported again in RData. This might be a relatively exceptional case, but both "RData" and "Rdata" are widely used. FileIO already accepts both "RData" and "rdata", I guess we could add "Rdata" to the list but having something more systematic would be nice.
BTW, we already support both "jpg" and "JPG", .stl" and ".STL", ".fit" and ".FIT", ".fits" and ".FITS", ".fts" and ".FTS", ".mid" and ".MID", so it seems to me that case sensitivity really doesn't make sense in practice.
Activity
SimonDanisch commentedon Jan 13, 2020
I find it bad style to support uppercase and lowercase extensions, which probably only a few extension vendors started doing. So I'm in favor of keeping this explicit for the few formats, that started allowing the uppercase version...
oxinabox commentedon Mar 17, 2021
I don't think I agree. or at least not entirely.
File format when recogizing by extension (rather than magic byte) should be done in a case-insensitive way.
E.g. convert all of them to lower case before comparing.
Remembing that Windows historically uses a a case-insesitive file-system;
and also historically depended a lot more on the extension to decide what to do with a file.
In contrast to Unixen which has things like the shebang line to specfy interpretter.
I think it would be very weird to have a file extension that has to be in upper-case as the one way it is distinguished from another, simply because that wouldn't work in Windows.
JohsEnevoldsen commentedon Dec 28, 2021
I ran into this issue with RData.jl. It not obvious to me (a Julia beginner) that capitalization of the file extension was the problem. I filed an issue at RData.jl (JuliaData/RData.jl#91).
nalimilan commentedon Feb 6, 2022
This has been reported again in RData. This might be a relatively exceptional case, but both "RData" and "Rdata" are widely used. FileIO already accepts both "RData" and "rdata", I guess we could add "Rdata" to the list but having something more systematic would be nice.
nalimilan commentedon Feb 6, 2022
BTW, we already support both "jpg" and "JPG", .stl" and ".STL", ".fit" and ".FIT", ".fits" and ".FITS", ".fts" and ".FTS", ".mid" and ".MID", so it seems to me that case sensitivity really doesn't make sense in practice.