kpathsea: Casefolding rationale

 
 5.4.1 Casefolding rationale
 ---------------------------
 
 The purpose of the fallback casefolding search is to ease moving complex
 documents between case-insensitive (file)systems and case-sensitive
 ones.  In particular, Apple decided to make the default filesystem on
 Macs be case-insensitive some years ago, and this has exacerbated a
 problem of people creating documents that use, say, an image under the
 name 'foo.jpg', while the actual file is named 'foo.JPG' or 'Foo.jpg'.
 It works on the Mac but if the document is transferred and run on a
 standard case-sensitive Unix (file)system, the file can't be found, due
 only to differences in case.
 
    This same problematic scenario has always existed on Windows, but for
 whatever reason, it has become much more common since Apple also went to
 a case-insensitive filesystem.  Hence the relatively late change to the
 Kpathsea behavior.
 
    The fallback case-insensitive search is omitted at compile-time on
 Windows, where (for practical purposes) all file names are
 case-insensitive at the kernel level, and so the normal search will
 already have definitively matched or not.  Therefore, search results in
 unusual cases can be different on Windows and Unix--but this has always
 been true.