Case Insensitive
   HOME

TheInfoList



OR:

In computers, case sensitivity defines whether uppercase and lowercase letters are treated as distinct (case-sensitive) or equivalent (case-insensitive). For instance, when users interested in learning about dogs search an
e-book An ebook (short for electronic book), also known as an e-book or eBook, is a book publication made available in digital form, consisting of text, images, or both, readable on the flat-panel display of computers or other electronic devices. Alt ...
, "dog" and "Dog" are of the same significance to them. Thus, they request a case-insensitive search. But when they search an online encyclopedia for information about the
United Nations The United Nations (UN) is an intergovernmental organization whose stated purposes are to maintain international peace and international security, security, develop friendly relations among nations, achieve international cooperation, and be ...
, for example, or something with no ambiguity regarding capitalization and ambiguity between two or more terms cut down by capitalization, they may prefer a case-sensitive search.


Areas of significance

Case sensitivity may differ depending on the situation: * Searching: Users expect information retrieval systems to be able to have correct case sensitivity depending on the nature of an operation. Users looking for the word "dog" in an online journal probably do not wish to differentiate between "dog" or "Dog", as this is a writing distinction; the word should be matched whether it appears at the beginning of a sentence or not. On the other hand, users looking for information about a brand name, trademark, human name, or city name may be interested in performing a case-sensitive operation to filter out irrelevant results. For example, somebody searching for the name "Jade" would not want to find references to the mineral called "jade". On the English Wikipedia for example a search for Friendly fire returns the military article but Friendly Fire (capitalized "Fire") returns the disambiguation page.Note that the link "Friendly Fire" must go through the (disambiguation) qualifier in a Wikipedia article to avoid a WP:INTDAB error. * Usernames: Authentication systems usually treat usernames as case-insensitive to make them easier to remember, reducing typing complexity, and eliminate the possibility of both mistakes and
fraud In law, fraud is intentional deception to secure unfair or unlawful gain, or to deprive a victim of a legal right. Fraud can violate civil law (e.g., a fraud victim may sue the fraud perpetrator to avoid the fraud or recover monetary compens ...
when two usernames are identical in every aspect except the case of one of their letters. However, these systems are not case-blind. They preserve the case of the characters in the name so that users may choose an aesthetically pleasing username combination. * Passwords: Authentication systems usually treat passwords as case-sensitive. This enables the users to increase the complexity of their passwords. * File names: Traditionally,
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating systems treat file names case-sensitively while
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
is case-insensitive but, for most file systems,
case-preserving When a computer file system stores file names, the computer may keep or discard case information. When the case is stored, it is called case preservation. A system that is not case-preserving is necessarily case-insensitive, but it is possible and ...
. For more details, see below. * Variable names: Some programming languages are case-sensitive for their variable names while others are not. For more details, see below. *
URL A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifie ...
s: The ''path'', ''query'', ''fragment'', and ''authority'' sections of a URL may or may not be case-sensitive, depending on the receiving
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
. The ''scheme'' and ''host'' parts, however, are strictly lowercase.


In programming languages

Some programming languages are case-sensitive for their identifiers ( C, C++,
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
, C#, Verilog,
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sa ...
,
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
and Swift). Others are case-insensitive (i.e., not case-sensitive), such as ABAP,
Ada Ada may refer to: Places Africa * Ada Foah, a town in Ghana * Ada (Ghana parliament constituency) * Ada, Osun, a town in Nigeria Asia * Ada, Urmia, a village in West Azerbaijan Province, Iran * Ada, Karaman, a village in Karaman Province, Tur ...
, most
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
s (an exception being BBC BASIC), Fortran, SQL (for the syntax, and for some vendor implementations, e.g.
Microsoft SQL Server Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which ma ...
, the data itself)Although one can explicitly set a single database or column collation to be case-sensitive and
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Fren ...
. There are also languages, such as Haskell, Prolog, and Go, in which the capitalisation of an identifier encodes information about its
semantics Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy Philosophy (f ...
. Some other programming languages have varying case sensitivity; in
PHP PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group ...
, for example, variable names are case-sensitive but function names are not case-sensitive. This means that if you define a function in lowercase, you can call it in uppercase, but if you define a variable in lowercase, you cannot refer to it in uppercase.
Nim Nim is a mathematical two player game. Nim or NIM may also refer to: * Nim (programming language) * Nim Chimpsky, a signing chimpanzee Acronyms * Network Installation Manager, an IBM framework * Nuclear Instrumentation Module * Negative index met ...
is case-insensitive and ignores underscores, as long as the first characters match.


In text search

A text search operation could be case-sensitive or case-insensitive, depending on the system, application, or context. The user can in many cases specify whether a search is sensitive to case, e.g. in most text editors, word processors, and Web browsers. A case-insensitive search is more comprehensive, finding "Language" (at the beginning of a sentence), "language", and "LANGUAGE" (in a title in capitals); a case-sensitive search will find the computer language "BASIC" but exclude most of the many unwanted instances of the word. For example, the
Google Search Google Search (also known simply as Google) is a search engine provided by Google. Handling more than 3.5 billion searches per day, it has a 92% share of the global search engine market. It is also the most-visited website in the world. The ...
engine is basically case-insensitive, with no option for case-sensitive search. In
Oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The word '' ...
SQL most operations and searches are case-sensitive by default, while in most other
DBMS In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
's SQL searches are case-insensitive by default. Case-insensitive operations are sometimes said to fold case, from the idea of folding the character code table so that upper- and lowercase letters coincide.


In filesystems

In filesystems in
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
systems, filenames are usually case-sensitive (there can be separate readme.txt and Readme.txt files in the same directory).
MacOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
is somewhat unusual in that, by default, it uses
HFS+ HFS Plus or HFS+ (also known as Mac OS Extended or HFS Extended) is a journaling file system developed by Apple Inc. It replaced the Hierarchical File System (HFS) as the primary file system of Apple computers with the 1998 release of Mac OS 8.1 ...
and
APFS Apple File System (APFS) is a proprietary file system developed and deployed by Apple Inc. for macOS Sierra (10.12.4) and later, iOS 10.3 and later, tvOS 10.2 and later, watchOS 3.2 and later, and all versions of iPadOS. It aims to fix c ...
in a case-insensitive (so that there cannot be a readme.txt and a Readme.txt in the same directory) but
case-preserving When a computer file system stores file names, the computer may keep or discard case information. When the case is stored, it is called case preservation. A system that is not case-preserving is necessarily case-insensitive, but it is possible and ...
mode (so that a file created as readme.txt is shown as readme.txt and a file created as Readme.txt is shown as Readme.txt) by default. This causes some issues for developers and
power users A power user is a user of computers, software and other electronic devices, who uses advanced features of computer hardware, operating systems, programs, or websites which are not used by the average user. A power user might not have extensive tech ...
, because most file systems in other Unix-like environments are case-sensitive, and, for example, a source code tree for software for Unix-like systems might have both a file named Makefile and a file named makefile in the same directory. In addition, some Mac Installers assume case insensitivity and fail on case-sensitive file systems. The older
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
filesystems FAT12 and
FAT16 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on Hard disk drive, hard disks and other devices. It is often supported for compatibi ...
were case-insensitive and not case-preserving, so that a file whose name is entered as readme.txt or ReadMe.txt is saved as README.TXT. Later, with
VFAT File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by c ...
in
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturin ...
the FAT file systems became case-preserving as an extension of supporting
long filenames Long filename (LFN) support is Microsoft's backward-compatible extension of the 8.3 filename (short filename) naming scheme used in DOS. Long filenames can be more descriptive, including longer filename extensions such as .jpeg, .tiff, .html, a ...
. Later Windows file systems such as NTFS are internally case-sensitive, and a readme.txt and a Readme.txt can coexist in the same directory. However, for practical purposes filenames behave as case-insensitive as far as users and most software are concerned. This can cause problems for developers or software coming from Unix-like environments, similar to the problems with macOS case-insensitive file systems.


Notes


References

{{reflist Articles containing video clips Capitalization