Hannah Arendt Center

Posted on at


Some computer languages are case-sensitive for their identifiers (C, C++, Java, C#, Verilog,[1] Ruby[2]and XML). Others are case-insensitive (i.e., not case-sensitive), such as Ada, most BASICs (an exception being BBC BASIC), Fortran, SQL[3] and Pascal. There are also languages, such as Haskell,Prolog and Go, in which the capitalization of an identifier encodes information about its semantics.

A text search operation could be case-sensitive or case-insensitive, depending on the system, application, or context. A case-insensitive search could be more convenient, not requiring the user to provide the precise casing, and returning more results, while a case-sensitive search enables the user to focus more precisely on a narrower result set. For example, Google searches are generally case-insensitive.[4] In Oracle SQL most operations and searches are case-sensitive by default,[5] while in most other DBMS's SQL searches are case-insensitive by default.[6] In most Internet browsers, the "Find in this page" feature has an option enabling the user to choose whether the search would be case-sensitive or not.

Case-insensitive operations are sometimes said to fold case, from the idea of folding the character code table so that upper- and lower-case letters coincide. The alternative smash case is more likely to be used by someone that considers this behaviour a misfeature or in cases wherein one case is actually permanently converted to the other.

In Unix filesystems, filenames are usually case-sensitive. Old Windows filesystems (VFAT, FAT32) are not case-sensitive (there cannot be a readme.txt and a Readme.txt in the same directory) but are case-preserving, i.e. remembering the case of the letters. The original FAT12 filesystem was case-insensitive.[7] Current Windows file systems, like NTFS, are case-sensitive; that is a readme.txt and a Readme.txt can exist in the same directory. However, the API for file access in Windows applications is case-insensitive, which makes the file names case-insensitive from a user point of view.[8]

 
A case-sensitive system (Unix-like)

Mac OS is somewhat unusual in that it uses HFS+ in a case insensitive but case preserving mode by default. This causes some issues for developers and power users, because most other environments are case sensitive, but many Mac Installers fail on case sensitive file systems.

 



About the author

160