Mamo
Mamo
Mamo
This article needs additional citations for verification. Please help improve t
his article by adding citations to reliable sources. Unsourced material may be c
hallenged and removed. (December 2015)
Contents [hide]
1 Data storage
2 Encoding
3 Formats 3.1 Windows text files
3.2 Unix text files
3.3 Apple Macintosh text files
4
5
6
7
Rendering
See also
Notes and references
External links
Data storage[edit]
tion. They avoid some of the problems encountered with other file formats, such
as endianness, padding bytes, or differences in the number of bytes in a machine
word. Further, when data corruption occurs in a text file, it is often easier t
o recover and continue processing the remaining contents. A disadvantage of text
files is that they usually have a low entropy, meaning that the information occ
upies more storage than is strictly necessary.
A simple text file needs no additional metadata to assist the reader in interpre
tation, and therefore may contain no data at all, which is a case of zero byte f
ile.
Encoding[edit]
The ASCII character set is the most common format for English-language text file
s, and is generally assumed to be the default file format in many situations. Fo
r accented and other non-ASCII characters, it is necessary to choose a character
encoding. In many systems, this is chosen on the basis of the default locale se
tting on the computer it is read on. Common character encodings include ISO 8859
-1 for many European languages.
Because many encodings have only a limited repertoire of characters, they are of
ten only usable to represent text in a limited subset of human languages. Unicod
e is an attempt to create a common standard for representing all known languages
, and most known character sets are subsets of the very large Unicode character
set. Although there are multiple character encodings available for Unicode, the
most common is UTF-8, which has the advantage of being backwards-compatible with
ASCII; that is, every ASCII text file is also a UTF-8 text file with identical
meaning.
Formats[edit]
On most operating systems the name text file refers to file format that allows o
nly plain text content with very little formatting (e.g., no bold or italic type
s). Such files can be viewed and edited on text terminals or in simple text edit
ors. Text files usually have the MIME type "text/plain", usually with additional
information indicating an encoding.
Windows text files[edit]
MS-DOS and Windows use a common text file format, with each line of text separat
ed by a two-character combination: carriage return (CR) and line feed (LF). It i
s common for the last line of text not to be terminated with a CR-LF marker, and
many text editors (including Notepad) do not automatically insert one on the la
st line.
On Microsoft Windows operating systems, a file is regarded as a text file if the
suffix of the name of the file (the "filename extension") is "txt". However, ma
ny other suffixes are used for text files with specific purposes. For example, s
ource code for computer programs is usually kept in text files that have file na
me suffixes indicating the programming language in which the source is written.
Most Windows text files use "ANSI", "OEM", "Unicode" or "UTF-8" encoding. What W
indows terminology calls "ANSI encodings" are usually single-byte ISO-8859 encod
ings (i.e. ANSI in the Microsoft Notepad menus is really "System Code Page", non
-Unicode, legacy encoding), except for in locales such as Chinese, Japanese and
Korean that require double-byte character sets. ANSI encodings were traditionall
y used as default system locales within Windows, before the transition to Unicod
e. By contrast, OEM encodings, also known as MS-DOS code pages, were defined by
IBM for use in the original IBM PC text mode display system. They typically incl
ude graphical and line-drawing characters common in (possibly full-screen) MS-DO