|This article needs additional citations for verification. (December 2010)|
Text sometimes exhibits case sensitivity; that is, words can differ in meaning based on differing use of uppercase and lowercase letters. Words with capital letters do not always have the same meaning when written with lowercase letters. For example, :
- Bill is the first name of former U.S. president William Clinton, who could have signed a bill (which is proposed legislation that was approved by Congress).
- A Polish person can use polish to clean or shine something.
- In food, the Calorie, with a capital C, is sometimes used to denote 1000 calories of energy.
The opposite term of "case-sensitive" is "case-insensitive".
Use in computer systems
In computers, some examples of usually case-sensitive data are:
- variable names
- text string searches within electronic text
Some computer languages are case-sensitive for their identifiers (C, C++, Java, C#, Verilog, Ruby and XML). Others are case-insensitive (i.e., not case-sensitive), such as Ada, most BASICs (an exception being BBC BASIC), Fortran, SQL 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. In Oracle SQL most operations and searches are case-sensitive by default, while in most other DBMS's SQL searches are case-insensitive by default. 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. 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 filenames case-insensitive from the application's point of view. Therefore, applications only have access to one of the files whose filenames only differ in case, and some commands may fail if the filename provided is ambiguous.
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.
- Kernighan, Brian W.; Dennis M. Ritchie (February 1978). "Chapter 2: Types, Operators and Expressions". The C Programming Language (1st ed.). Englewood Cliffs, NJ: Prentice Hall. p. 33. ISBN 0-13-110163-3.
- Matsumoto, Yukihiro (January 2002). "Chapter 2: Language Basics". Ruby in a nutshell (1st ed.). O'Reilly Media. p. 9. ISBN 0-596-00214-9.
- Although one can explicitly set a single database or column collation to be case-sensitive
- "case-sensitive-search - case sensitive google search - Google Project Hosting". Code.google.com. Retrieved 2013-05-20.
- "MySQL :: MySQL 5.0 Reference Manual :: C.5.5.1 Case Sensitivity in String Searches". Dev.mysql.com. Retrieved 2013-05-20.
- "Case Sensitivity in Subsystem for UNIX-based Applications". Technet.microsoft.com. 2005-08-22. Retrieved 2013-05-20.
- "Filenames are Case Sensitive on NTFS Volumes". Support.microsoft.com. 2006-11-01. Retrieved 2013-05-20.
|Look up case sensitivity in Wiktionary, the free dictionary.|