What is a text file?

A text file is a computer file that stores a typewritten document as a series of alphanumeric characters, usually without visual formatting information. The content may be a personal note or list, a newspaper or news article, a book, or any other text that can be faithfully reproduced in typed format. Text files are similar to word processing files in that the content of both is primarily textual; they differ in that text files generally do not record information such as character style and size, pagination, or other details that would specify the appearance of a finished document. Some computer operating systems make a basic distinction between a text file, which is intended to be directly translated into human-readable text, and a binary file, which is directly interpreted by the computer.

The ASCII coding system is known for its adaptability and simplicity.

In most of the schemes used to encode text, each character is assigned a numeric value, and then the text is written as a string of binary numbers. A family of encoding schemes, called the American Standard Code for Information Interchange (ASCII), became a widely used standard early in the history of computing, despite its insufficient support for languages ​​other than English. The ISO 8859 family of codes provided much better support for languages ​​based on the Latin script and similar scripts, but was unable to encode characters from East Asian languages ​​such as Japanese, leading to a proliferation of incompatible standards. .

More recently, the Unicode® Consortium has been developing an encoding system called Unicode® that aims to assign a unique number to each character used in every language on the planet. This will allow a single code to be used for each language and text from multiple languages ​​to appear in a single file. The first part of Unicode is based on ISO 8859, which in turn is based on ASCII. Using Unicode® may have advantages even in English-speaking countries, as text encoded with older schemes may show minor inconsistencies when moved from one system to another.

See also  What are output devices?

Advantages of text files include small size and versatility. Kilobytes or megabytes smaller than the same data stored in other formats, can be exchanged quickly and in bulk via email or disk. Most can be opened on computers running multiple operating systems using very basic software. The main disadvantage is the lack of formatting. A text file may be a poor choice to represent a document that contains images or relies on design elements to communicate its meaning, for example, a file that contains tabular data, mathematical formulas, or concrete poetry.

Text files are generally intended to be read and edited by humans, but not all of them contain content intended primarily for human consumption. Most of the programming code is stored in a text file before it is compiled, that is, it is translated into a machine-readable binary file. Files may also contain machine-readable text tags that provide formatting information in addition to plain text. For example, a hypertext markup language (HTML) file can be opened as a plain text file in a text editor or displayed as a formatted web page after it is interpreted by a web browser. Similar schemes include LaTeX, used to prepare scientific papers, and Extensible Markup Language (XML), used to structure data.

Related Posts