3 ms·
This points to a fascinating underlying difference between the operating systems. In general, UNIX attempts to be completely non-character-set aware and is buil
by jcrawfordor 10y ago
This points to a fascinating underlying difference between the operating systems. In general, UNIX attempts to be completely non-character-set aware and is built with the philosophy that how to render characters is strictly the terminal's problem. Windows, on the other hand, has a notion of a system character encoding and will try to keep everything compliant with it (with mixed success).
There is a very important takeaway of this: case-sensitivity. UNIX cannot be case-insensitive for file names because the mapping of lowercase to uppercase characters is dependent on the character encoding used, which it doesn't know. Windows can (and does) coalesce case for file names because it knows the character set in use and can consult the relevant mapping.
This difference in behavior produces all sorts of frustrating behavior when interacting between the two platforms, e.g. the classic case of Windows SMB mounting a share from a nix server that contains two files differentiated only by case. It'll show both entries but think they both point to the same thing. On the other hand, it's easy to create file names on a Windows device that are near impossible to name on nix. These are important things to be aware of if you ever implement a cross-platform network user environment.
- cesarb 10y ago> Windows can (and does) coalesce case for file names because it knows the character set in use and can consult the relevant mapping. Actually, it's not the character set in use. Windows uses a case mapping table which is part of the NTFS filesystem metadata. See for instance https://web.archive.org/web/20110308034840/http://blogs.msdn.com/b/michkap/archive/2005/01/16/353873.aspx https://web.archive.org/web/20110308034840/http://blogs.msdn... (Yes, this means that the mapping of lowercase to uppercase characters can change if the file is copied to another drive in the same machine!)