Text file

Further, when data corruption occurs in a text file, it is often easier to recover and continue processing the remaining contents.

A disadvantage of text files is that they usually have a low entropy, meaning that the information occupies more storage than is strictly necessary.

A simple text file may need no additional metadata (other than knowledge of its character set) to assist the reader in interpretation.

In many systems, this is chosen based on the default locale setting on the computer it is read on.

Text files usually have the MIME type text/plain, usually with additional information indicating an encoding.

Most Microsoft Windows text files use ANSI, OEM, Unicode or UTF-8 encoding.

ANSI encodings were traditionally used as default system locales within Microsoft Windows, before the transition to Unicode.

They typically include graphical and line-drawing characters common in DOS applications.

[7] Lines of classic Mac OS text files are terminated with CR characters.

Depending on the application, control codes may be rendered either as literal instructions acted upon by the editor, or as visible escape characters that can be edited as plain text.

A stylized iconic depiction of a CSV -formatted text file