3 ms·
Case-insensitivity is language-dependent, people know about this, right? Whether the lowercase version of "I" is "i", that depends on your language. Often it i
by Viliam1234 6y ago
Case-insensitivity is language-dependent, people know about this, right?
Whether the lowercase version of "I" is "i", that depends on your language. Often it is, but for example in Turkish, lowercase "I" is "ı", and lowercase "İ" is "i".
How will the language be specified on the case-sensitive filesystem? Per file, per directory, per device?
Can I have English "I.txt" and Turkish "i.txt" in the same directory? Are they compared using the English rules or the Turkish rules?
What happens if I copy a file to a directory or device using a different language? To a device using a different filesystem that doesn't support languages? If I copy 10 files from a Turkish computer to a memory stick, then copy them to an English computer, will I get only 9 files at the end, because "I.txt" and "i.txt" got overwritten?
- mnw21cam 6y agoThis one fact is (in my mind) the death-knell of this whole misguided idea. Also note that once you set up the case sensitivity status on a directory/device, it could be hard to change it. For instance, if I have two files named "I.txt" and "i.txt" in a directory that is case-sensitive, I can't change that directory to case-insensitive using English rules. But I could using Turkish rules. You would have to do a full scan of the area you are planning to change in order to check whether anything would clash. Also, you have the problem of filename searches. At the moment, it is possible to open a file by name in a directory that has lots of files, and the filesystem can do an indexed search for that file. If you change it to case-sensitive, then either you need to do a linear search instead (which could absolutely cripple some use-cases), or store an indexed case-insensitive lookup table, with the additional proviso that the index must be able to give you back the canonical filename. If the case-sensitivity changes, then this index must be recreated from scratch.
- cyphar 6y agoPeople are aware of it -- Unicode has casefolding rules which apply to all Unicode characters and are supposed to solve this problem, but I believe you can run into issues when the casefolding rules end up not using language-specific characters (meaning that any language information is lost in the translation). Another example of this is the German eszett ("ß".upper() == "SS" but "SS".lower() == "ss" != "ß").