Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Combinations of preservation and sensitivity  



1.1  Case-preserving, case-insensitive  





1.2  Non-case-preserving, case-insensitive  





1.3  Case-sensitive (results in case-preservation)  







2 Examples of file systems  





3 References  














Case preservation: Difference between revisions






Norsk bokmål

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Help
 

From Wikipedia, the free encyclopedia
 


Browse history interactively
 Previous edit
Content deleted Content added
Update "Mac OS X" to "macOS" to reflect current official name.
Reverting edit(s) by 2402:800:7D60:38DD:52:987D:231A:85DF (talk) to rev. 1208129093 by BattyBot: Non-constructive edit (UV 0.1.5)
 
(25 intermediate revisions by 15 users not shown)
Line 1: Line 1:

{{Short description|Text processing that preserves the original capitalization of text}}

{{Unreferenced stub|auto=yes|date=December 2009}}

{{distinguish|Case sensitivity}}

When a [[computer]] [[file system]] stores file names, the computer may keep or discard [[Letter case|case]] information. When the case is stored, it is called '''case preservation'''.

{{More citations needed|date=February 2024}}

[[File:A (capital and small).svg|thumb|159px|The [[lowercase]] "a" and [[uppercase]] "A" are the two case variants of the first letter in the [[English alphabet]].]]



In [[file system]]s, '''case preservation''' is the preservation of the [[letter case]] (uppercase or lowercase) of letters in file names. If an attempt is made to create a file named "ThisIsAFile" on a file system that preserves letter case, the file's name will be "ThisIsAFile", rather than, for example, "thisisafile" or "THISISAFILE".

A system that is not case-preserving is necessarily [[case-insensitive]], but it is possible and common for a system to be case-insensitive, yet case-preserving. This combination is often considered most natural for people to understand, because most people prefer using the correct [[capitalization]] but will still recognize others. For example, if someone refers to the "uNiTeD states oF AMERICA", it is understood to mean the [[United States of America]], even though the capitalization is incorrect.



In contrast, a file system that does not preserve letter case will typically store letters in file names either as all lowercase or as all uppercase, and the letter case information will thus be lost. If an attempt is made to create a file named "ThisIsAFile" on a file system that does not preserve letter case, the file's name will be "thisisafile" if letters are stored as all lowercase or "THISISAFILE" if letters are stored as all uppercase.

[[macOS]], the current versions of the [[Microsoft Windows]] [[operating system]]s and all versions of [[Amiga OS]] are case-preserving and case-insensitive in most cases. Since they are case-insensitive, when requesting a file by name any capitalization can be used, in contrast to case-sensitive systems where only a single capitalization would work. But as they are case-preserving, when viewing a file's name it will be presented with the capitalization used when the file was created. On a non-case-preserving system, arbitrary capitalization would be displayed instead, such as all upper- or lower-case. Also, in case-insensitive but case preserving file systems there cannot be a readme.txt and a Readme.txt in the same folder.



== Combinations of preservation and sensitivity ==

Examples of systems with various case-sensitivity and case-preservation exist among [[file systems]]:

=== Case-preserving, case-insensitive ===

It is possible and common for a system to be case-insensitive, yet case-preserving. This combination is often considered most natural for people to understand, because most people prefer using the correct [[capitalization]] but will still recognize others. For example, if someone refers to the "uNiTeD states oF AMERICA," it is understood to mean the [[United States of America]], even though the capitalization is incorrect.


Most of the file systems in [[macOS]], current versions of [[Microsoft Windows]], and all versions of [[Amiga OS]] are case-preserving and case-insensitive. Since they are case-insensitive, any combination of lowercase or uppercase letters can be used when referring a file, so that a file named "ThisIsAFile" can be referred to as "thisisafile", "THISISAFILE", "thisISaFILE", and so on. However, since they are case-preserving, when a file is created, the file name will be stored in the combination of lower and upper case letters specified, so that if a file is created as "ThisIsAFile", the name of the file will be "ThisIsAFile" rather than, for example, "thisisafile" or "THISISAFILE".


This means that one cannot save two files with the same name in the same place if the only difference in their file names is capitalization (lowercase or uppercase letters). For example, one cannot have files named readme.txt and Readme.tXT in the same folder.


=== Non-case-preserving, case-insensitive ===

A system that is non-case-preserving is necessarily also case-insensitive.


This applies, for example, to [[Identifier]]s ([[Column (database)|column]] and [[Table (database)|table]] names) in some relational databases (for example [[IBM DB2|DB2]], [[Firebird (database server)|Interbase/Firebird]], [[Oracle Database|Oracle]] and [[Snowflake Inc.|Snowflake]]<ref>{{cite web|access-date=2024-02-08|title=Identifier requirements {{!}} Snowflake Documentation|url=https://docs.snowflake.com/en/sql-reference/identifiers-syntax|work=docs.snowflake.com}}<!-- auto-translated from Danish by Module:CS1 translator --></ref>), unless the identifier is specified within double quotation marks (in which case the identifier becomes case-sensitive).<ref>{{cite web|access-date=2024-02-08|language=en|title=Database identifiers, quoting and case sensitivity|url=https://alberton.info/dbms_identifiers_and_case_sensitivity.html|work=Lorenzo Alberton}}<!-- auto-translated from Danish by Module:CS1 translator --></ref>


In a non-case-preserving system, arbitrary capitalization may be used by the system for storage and display, such as for example all letters being store in lowercase (or alternatively all in uppercase). For example, in Oracle Database, a table created with the name <code>CustomersRegion1</code> will be stored as <code>CUSTOMERSREGION1</code> (unless it is created under the name <code>"CustomersRegion1"</code>, which means that the identifier will be treated as case-sensitive, and therefore must be referenced with that exact casing).


=== Case-sensitive (results in case-preservation) ===

Most of the file systems in [[Unix-like]] systems other than macOS, such as file systems in [[Linux]], are case-sensitive. This means that there can be two files in the same folder whose only difference is capitalization. For example, readme.txt and Readme.tXT can be found in the same folder.


== Examples of file systems ==

Some examplesof [[file systems]] with various case-sensitivity and case-preservation are:



{|class="wikitable" align="center"

{|class="wikitable" align="center"

Line 13: Line 34:

|-

|-

! Case-preserving

! Case-preserving

| [[Unix File System|UFS]], [[ext3]], [[ext4]], [[HFS Plus]] (optional), [[NTFS]] (inunix)|| | [[File Allocation Table#Long_file_names|VFAT]], [[File Allocation Table#FAT32|FAT32]] which is basically always used with long filename support, [[NTFS]], [[HFS Plus]]

| [[Unix File System|UFS]], [[ext3]], [[ext4]], [[HFS Plus]] (optional), [[NTFS]] (inUnix-like systems), [[Apple File System|APFS]] (optional)

| [[File Allocation Table#Long file names|VFAT]], [[File Allocation Table#FAT32|FAT32]] which is basically always used with long filename support, [[NTFS]], [[HFS Plus]] (default), [[Apple File System|APFS]] (default)

|-

|-

! Non-case-preserving

! Non-case-preserving

| Impossible

| Impossible || [[File Allocation Table#FAT12|FAT12]], [[File Allocation Table#Final FAT16|FAT16]] only when without long filename support.

| [[File Allocation Table#FAT12|FAT12]], [[File Allocation Table#Final FAT16|FAT16]] only when without long filename support

|}

|}


== References ==

<references/>



{{File systems}}

{{File systems}}


{{DEFAULTSORT:Case Preservation}}

{{DEFAULTSORT:Case Preservation}}

[[Category:Computer file systems]]

[[Category:Computer file systems]]

{{Compu-storage-stub}}


Latest revision as of 12:01, 28 April 2024

The lowercase "a" and uppercase "A" are the two case variants of the first letter in the English alphabet.

Infile systems, case preservation is the preservation of the letter case (uppercase or lowercase) of letters in file names. If an attempt is made to create a file named "ThisIsAFile" on a file system that preserves letter case, the file's name will be "ThisIsAFile", rather than, for example, "thisisafile" or "THISISAFILE".

In contrast, a file system that does not preserve letter case will typically store letters in file names either as all lowercase or as all uppercase, and the letter case information will thus be lost. If an attempt is made to create a file named "ThisIsAFile" on a file system that does not preserve letter case, the file's name will be "thisisafile" if letters are stored as all lowercase or "THISISAFILE" if letters are stored as all uppercase.

Combinations of preservation and sensitivity[edit]

Case-preserving, case-insensitive[edit]

It is possible and common for a system to be case-insensitive, yet case-preserving. This combination is often considered most natural for people to understand, because most people prefer using the correct capitalization but will still recognize others. For example, if someone refers to the "uNiTeD states oF AMERICA," it is understood to mean the United States of America, even though the capitalization is incorrect.

Most of the file systems in macOS, current versions of Microsoft Windows, and all versions of Amiga OS are case-preserving and case-insensitive. Since they are case-insensitive, any combination of lowercase or uppercase letters can be used when referring a file, so that a file named "ThisIsAFile" can be referred to as "thisisafile", "THISISAFILE", "thisISaFILE", and so on. However, since they are case-preserving, when a file is created, the file name will be stored in the combination of lower and upper case letters specified, so that if a file is created as "ThisIsAFile", the name of the file will be "ThisIsAFile" rather than, for example, "thisisafile" or "THISISAFILE".

This means that one cannot save two files with the same name in the same place if the only difference in their file names is capitalization (lowercase or uppercase letters). For example, one cannot have files named readme.txt and Readme.tXT in the same folder.

Non-case-preserving, case-insensitive[edit]

A system that is non-case-preserving is necessarily also case-insensitive.

This applies, for example, to Identifiers (column and table names) in some relational databases (for example DB2, Interbase/Firebird, Oracle and Snowflake[1]), unless the identifier is specified within double quotation marks (in which case the identifier becomes case-sensitive).[2]

In a non-case-preserving system, arbitrary capitalization may be used by the system for storage and display, such as for example all letters being store in lowercase (or alternatively all in uppercase). For example, in Oracle Database, a table created with the name CustomersRegion1 will be stored as CUSTOMERSREGION1 (unless it is created under the name "CustomersRegion1", which means that the identifier will be treated as case-sensitive, and therefore must be referenced with that exact casing).

Case-sensitive (results in case-preservation)[edit]

Most of the file systems in Unix-like systems other than macOS, such as file systems in Linux, are case-sensitive. This means that there can be two files in the same folder whose only difference is capitalization. For example, readme.txt and Readme.tXT can be found in the same folder.

Examples of file systems[edit]

Some examples of file systems with various case-sensitivity and case-preservation are:

Case-sensitive Case-insensitive
Case-preserving UFS, ext3, ext4, HFS Plus (optional), NTFS (in Unix-like systems), APFS (optional) VFAT, FAT32 which is basically always used with long filename support, NTFS, HFS Plus (default), APFS (default)
Non-case-preserving Impossible FAT12, FAT16 only when without long filename support

References[edit]

  1. ^ "Identifier requirements | Snowflake Documentation". docs.snowflake.com. Retrieved 2024-02-08.
  • ^ "Database identifiers, quoting and case sensitivity". Lorenzo Alberton. Retrieved 2024-02-08.

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Case_preservation&oldid=1221190422"

    Category: 
    Computer file systems
    Hidden categories: 
    Articles with short description
    Short description matches Wikidata
    Articles needing additional references from February 2024
    All articles needing additional references
     



    This page was last edited on 28 April 2024, at 12:01 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki