Nepedia
Back to Discover
Advanced Reader
💻

Plain text

technology Maturity 11-13 Next article →

Plain text is a fundamental way to represent data in computing. It consists of a sequence of character codes that represent readable material. Unlike rich text, plain text does not include graphical information like font sizes, colors, or bold styles.

Plain text
Plain text

It also excludes complex objects such as images or floating-point numbers. While it is a simple format, it can include whitespace characters. These include spaces, tabs, and line breaks to help arrange text. Because it lacks complex formatting, plain text is highly portable. It can be opened and read by almost any computer system or text editor.

Plain text
Plain text

To understand how plain text works, we must look at character encoding. An encoding is a system that assigns a specific number to every character. When a computer reads a file, it interprets these numbers as letters or symbols. Plain text is essentially a pure sequence of these character codes. In contrast, a binary file contains data that cannot be correctly interpreted through character encoding alone. For example, if a file contains the word "hello" followed by four bytes of a non-character integer, it becomes a binary file.

Plain text
Plain text

There are several ways to categorize text files based on their structure. Plain text is distinct from formatted text, which adds style information to the characters. It is also different from structured text, where parts like paragraphs and sections are identified. Some definitions consider files containing markup to be plain text. Markup is a way of using human-readable characters to provide structure. Examples include HTML, XML, and even SVG files, which can describe drawings. Even though these files contain instructions for layout, the files themselves are still considered plain text streams.

Plain text
Plain text

The history of text encoding shows how much computing has evolved. Before the early 1960s, computers were mostly used for math rather than text. Memory was very expensive during this era. Many computers used only 6 bits for each character, allowing for only 64 possible characters. This was not enough to include both uppercase and lowercase letters. Researchers had to use workarounds, such as placing an asterisk before a letter to show it was uppercase. Fred Brooks of IBM later argued for the use of 8-bit bytes. His vision helped allow for much more complex text processing in the future.

Plain text
Plain text

As computing grew, the ASCII standard became widely used. ASCII uses values from 0 to 31 for non-printing control characters. These control characters, known as the C0 set, manage things like newlines and tabs. Graphic characters, such as letters and punctuation, use values from 32 to 127. However, ASCII could not support many international languages. It lacked accented characters used in Spanish, French, or German. To solve this, the ISO developed various code pages, such as ISO 8859-1, also known as Latin-1.

Plain text
Plain text

Modern computing has largely moved toward a unified system called Unicode. This was developed to solve the confusion caused by many incompatible encoding variations. Unicode is massive, allowing for 1,114,112 different code values. This system covers nearly all modern writing systems and many historical ones. It also includes mathematical symbols and even printer's dingbats. Today, Unicode-based encodings like UTF-8 and UTF-16 are very common. Using UTF-8 can even help avoid technical issues like endianness in different computer architectures.

Plain text
Plain text

Plain text is used in almost every part of the digital world. It is the standard for programming source code, which provides instructions to computers. It is also used for configuration files that store a program's settings. Many people use plain text for email and simple .txt files. Even web browsers process plain text to display information to users. Because it is so simple and independent of specific software, it is considered the best format for storing knowledge persistently. It ensures that information can be read long after the original program is gone.

Plain text
Plain text
644 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Plain_text.png
Plain_text.png
More to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.