4 ms·
I've run into issues with it from a programming point of view, you have to make sure to do a (slightly) more expensive case insensitive comparison when dealing
by bigdubs 12y ago
I've run into issues with it from a programming point of view, you have to make sure to do a (slightly) more expensive case insensitive comparison when dealing with filenames.
- Someone1234 12y agoThis is only an issue when it is fake case insensitive. In the sense that it claims it is case insensitive but in fact is case sensitive (and returns case sensitive filenames). NTFS is a perfect example of this, it claims to be case insensitive but in fact stores everything in a case sensitive way (so you wind up doing things like ToUpper() on every filename). On a legitimately case insensitive filesystem both "etc" and "ETC" would return identical filenames as they would be stored identically in the file system's database (e.g. would return "etc" for both). So what you're really giving is not an example of why case insensitivity is bad, but why half measures are bad.
- Arnavion 12y ago>NTFS is a perfect example of this, it claims to be case insensitive Where does it claim this? In any case this is not true because... >but in fact stores everything in a case sensitive way This does not have to be true. NTFS can be case-sensitive or case-insensitive depending on which subsystem is accessing it. For example, while the POSIX subsystem for Windows was a thing, installing it had the side-effect of turning NTFS case-sensitive.
- bigdubs 12y agoPro-tip; never do .ToUpper() / .ToLower(), use foo.Equals(bar, StringComparison.OrdinalIgnoreCase), saves a string allocation also only loops over the strings once. For the truly anal.