encyclopegia.org

Text file

A text file (sometimes spelled textfile; an old alternative name is flat file) is a kind of computer file that is structured as a sequence of lines of electronic text.[11] A text file exists stored as data within a computer file system.[8] In operating systems such as CP/M, where the operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing one or more special characters, known as an end-of-file (EOF) marker, as padding after the last line in a text file.[5] In modern operating systems such as DOS, Microsoft Windows and Unix-like systems, text files do not contain any special EOF character, because file systems on those operating systems keep track of the file size in bytes.[8] Some operating systems, such as Multics, Unix-like systems, CP/M, DOS, the classic Mac OS, and Windows, store text files as a sequence of bytes, with an end-of-line delimiter at the end of each line.[src] Other operating systems, such as OpenVMS and OS/360 and its successors, have record-oriented filesystems, in which text files are stored as a sequence either of fixed-length records or of variable-length records with a record-length value in the record header.[src] "Text file" refers to a type of container, while plain text refers to a type of content.[8] At a generic level of description, there are two kinds of computer files: text files and binary files.[src]

A text file (sometimes spelled textfile; an old alternative name is flat file) is a kind of computer file that is structured as a sequence of lines of electronic text.[11] A text file exists stored as data within a computer file system.[8] In operating systems such as CP/M, where the operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing one or more special characters, known as an end-of-file (EOF) marker, as padding after the last line in a text file.[5] In modern operating systems such as DOS, Microsoft Windows and Unix-like systems, text files do not contain any special EOF character, because file systems on those operating systems keep track of the file size in bytes.[8] Some operating systems, such as Multics, Unix-like systems, CP/M, DOS, the classic Mac OS, and Windows, store text files as a sequence of bytes, with an end-of-line delimiter at the end of each line.[src] Other operating systems, such as OpenVMS and OS/360 and its successors, have record-oriented filesystems, in which text files are stored as a sequence either of fixed-length records or of variable-length records with a record-length value in the record header.[src] "Text file" refers to a type of container, while plain text refers to a type of content.[8] At a generic level of description, there are two kinds of computer files: text files and binary files.[src] ===Microsoft Windows text files=== 's Notepad opening an example text file DOS and Microsoft Windows use a common text file format, with each line of text separated by a two-character combination: carriage return (CR) and line feed (LF).[8] It is 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 last line.[src] 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 .[11] However, many other suffixes are used for text files with specific purposes.[src] For example, source code for computer programs is usually kept in text files that have file name suffixes indicating the programming language in which the source is written.[11] Most Microsoft Windows text files use ANSI, OEM, or Unicode (UTF-16 or UTF-8) encoding.[8] What Microsoft Windows terminology calls "ANSI encodings" are usually single-byte ISO/IEC 8859 encodings (i.e.[src] 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.[8] ANSI encodings were traditionally used as default system locales within Microsoft Windows, before the transition to Unicode.[src] By contrast, OEM encodings, also known as DOS code pages, were defined by IBM for use in the original IBM PC text mode display system.[1] They typically include graphical and line-drawing characters common in DOS applications.[src] "Unicode"-encoded Microsoft Windows text files contain text in UTF-16 Unicode Transformation Format.[10] Such files normally begin with byte order mark (BOM), which communicates the endianness of the file content.[9] Although UTF-8 does not suffer from endianness problems, many Microsoft Windows programs (i.e.[src] Notepad) prepend the contents of UTF-8-encoded files with BOM, to differentiate UTF-8 encoding from other 8-bit encodings.[10]

31 sentences · 31 cited inline · 12 references stored

References

  1. MS-DOS Kermit User Guide: For the IBM PC Family, Compatibles, and Other MS-DOS S . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "MS-DOS Kermit User Guide: For the IBM PC Family, Compatibles, and Other MS-DOS S ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "MS-DOS Kermit User Guide: For the IBM PC Family, Compatibles, and Other MS-DOS S ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA encyclopegia.org. (2026). MS-DOS Kermit User Guide: For the IBM PC Family, Compatibles, and Other MS-DOS S . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  2. 3.284 Printable File . POSIX . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "3.284 Printable File . POSIX ." 284 Printable File. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "3.284 Printable File . POSIX ." 284 Printable File. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA 284 Printable File. (2026). 3.284 Printable File . POSIX . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  3. System-Declared Uniform T . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "System-Declared Uniform T ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "System-Declared Uniform T ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA encyclopegia.org. (2026). System-Declared Uniform T . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  4. Designing Scripts for Cross-Platfor . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Designing Scripts for Cross-Platfor ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Designing Scripts for Cross-Platfor ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA encyclopegia.org. (2026). Designing Scripts for Cross-Platfor . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  5. Testing for the End of a File . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Testing for the End of a File ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Testing for the End of a File ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA encyclopegia.org. (2026). Testing for the End of a File . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  6. Folk, Michael. File Structures . 1992. · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Folk, Michael. File Structures . 1992." Folk, Michael. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Folk, Michael. File Structures . 1992." Folk, Michael. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA Folk, Michael. (2026). Folk, Michael. File Structures . 1992. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  7. Lewis, John. Computer Science Illuminated . Jones and Bartlett . 2006. · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Lewis, John. Computer Science Illuminated . Jones and Bartlett . 2006." Lewis, John. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Lewis, John. Computer Science Illuminated . Jones and Bartlett . 2006." Lewis, John. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA Lewis, John. (2026). Lewis, John. Computer Science Illuminated . Jones and Bartlett . 2006. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  8. Plain Text & Character Encoding: A Primer for Data Curators . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Plain Text & Character Encoding: A Primer for Data Curators ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Plain Text & Character Encoding: A Primer for Data Curators ." 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA encyclopegia.org. (2026). Plain Text & Character Encoding: A Primer for Data Curators . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  9. Using Byte Order Marks . Jan 7, 2021. · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Using Byte Order Marks . Jan 7, 2021." Using Byte Order Marks. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Using Byte Order Marks . Jan 7, 2021." Using Byte Order Marks. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA Using Byte Order Marks. (2026). Using Byte Order Marks . Jan 7, 2021. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  10. Freytag, Asmus. FAQ – UTF-8, UTF-16, UTF-32 & BOM . The Unicode Consortium . 2015-12-18. retrieved 2016-05 · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "Freytag, Asmus. FAQ – UTF-8, UTF-16, UTF-32 & BOM . The Unicode Consortium . 2015-12-18. retrieved 2016-05." Freytag, Asmus. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "Freytag, Asmus. FAQ – UTF-8, UTF-16, UTF-32 & BOM . The Unicode Consortium . 2015-12-18. retrieved 2016-05." Freytag, Asmus. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA Freytag, Asmus. (2026). Freytag, Asmus. FAQ – UTF-8, UTF-16, UTF-32 & BOM . The Unicode Consortium . 2015-12-18. retrieved 2016-05. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  11. 3.403 Text File . POSIX . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "3.403 Text File . POSIX ." 403 Text File. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "3.403 Text File . POSIX ." 403 Text File. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA 403 Text File. (2026). 3.403 Text File . POSIX . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

  12. 3.206 Line . POSIX . · retrieved 2026-08-09 · rev 1368681826
    Cite this reference

    MLA "3.206 Line . POSIX ." 206 Line. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826. Accessed 25 November 2026.

    Chicago "3.206 Line . POSIX ." 206 Line. 2026-08-09. https://en.wikipedia.org/w/index.php?oldid=1368681826.

    APA 206 Line. (2026). 3.206 Line . POSIX . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1368681826

Cite this article

MLA

"Text file." encyclopegia.org, 2026, https://encyclopegia.org/wiki/text-file. Accessed 25 November 2026.

Chicago

"Text file." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/text-file.

APA

encyclopegia.org. (2026). Text file. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/text-file

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

religious text

stub · references available

File Allocation Table

stub · references available

binary file

stub · references available

text

stub · references available

System File Checker

stub · references available

Rich Text Format

stub · references available

Drug Master File

stub · references available

Unix file permissions

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1368681826 · 0.5 · snapshot enwiki-001368681826

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.