Rich Text FormatRTFMicrosoft Worddocument file formatcross-platform interchange

Rich Text Format (RTF): The Legacy of Cross-Platform Document Exchange

Rich Text Format (RTF): The Legacy of Cross-Platform Document Exchange

Rich Text Format (RTF) is a legacy proprietary document file format developed by Microsoft Corporation. Introduced in 1987, it was designed to enable cross-platform document interchange, allowing users to share formatted text across different word processing applications and operating systems without losing essential styling.

Unlike plain text files, which contain no formatting information, RTF allows for the inclusion of fonts, margins, and styles. While it has largely been superseded by modern formats like DOCX, RTF remains a significant part of computing history due to its widespread compatibility and published specifications.

ไม่มีภาพประกอบ

Key Facts

  • Developer: Microsoft Corporation.
  • Initial Release: 1987 (with Microsoft Word 3.0 for Macintosh).
  • Final Specification: Version 1.9.1, released on March 19, 2008.
  • Primary Purpose: Cross-platform document interchange.
  • File Extension: .rtf
  • Magic Number: The file begins with the sequence {\rtf.

History and Evolution

RTF was created in the mid-to-late 1980s by Richard Brodie, Charles Simonyi, and David Luebbert of the Microsoft Word development team. The first reader and writer were shipped in 1987 as part of Microsoft Word 3.0 for Macintosh, implementing the RTF 1.0 specification.

Over the next two decades, Microsoft updated the specification alongside major releases of Microsoft Word and Office. The format evolved to support more complex elements, including Object Linking and Embedding (OLE) objects and various image types such as Windows Metafile, PICT, and bitmaps.

The final update, version 1.9.1, was released in 2008 to implement features from Office 2007. Microsoft has since discontinued enhancements to the specification. Consequently, features introduced in Word 2010 or later versions cannot be saved properly in RTF format.

RTF Version Timeline

RTF Specification and Microsoft Word Compatibility
RTF Version Publication Date MS Word Version Release Date
1.0 1987 Microsoft Word 3 1987
1.1 - Microsoft Word 4 1989
1.2 1993 Microsoft Word 5 1991
1.3 January 1994 Microsoft Word 6 1993
1.4 September 1995 Microsoft Word 95/7 1995
1.5 April 1997 Microsoft Word 97/8 1997
1.6 May 1999 Microsoft Word 2000/9 1999
1.7 August 2001 Microsoft Word 2002/10 2001
1.8 April 2004 Microsoft Word 2003/11 2003
1.9.1 March 19, 2008 Microsoft Word 2007/12 2006

Technical Architecture

Code Syntax

RTF uses a system of control words to define formatting. These words typically start with a backslash. For example, \b1 turns bold text on, while \b0 turns it off. Similar logic applies to italics (\i), underlining (\ul), subscripts (\sub), and superscripts (\superscript).

A delimiter in RTF is defined as a space, a digit or hyphen, or any character that is not a digit or letter (such as \, /, or }).

Character Encoding

Originally, RTF relied on 7-bit ASCII. To handle characters outside this range, it used escape sequences. A code page escape consists of a backslash and a typewriter apostrophe followed by two hexadecimal digits (e.g., \'c8 for the Arabic letter bāʼ in Windows-1256).

Starting with version 1.5 in 1997, RTF introduced Unicode support. This change was driven by Microsoft Word 97 becoming partially Unicode-enabled. In modern RTF, control words can accept signed 16-bit numbers; Unicode values exceeding 32,767 are expressed as negative numbers, and characters outside the Basic Multilingual Plane (BMP) are encoded using surrogate pairs.

Limitations and Criticisms

Despite its utility, RTF has several drawbacks compared to modern standards:

  • Lack of Compression: Unlike many modern document formats, RTF files are not compressed, leading to larger file sizes.
  • Inefficient Encoding: Every non-ASCII character in RTF requires multiple times as many bytes as it would in UTF-8.
  • Fragility: Certain complex elements, such as nested tables, can be fragile and may break when processed by silent converters.
  • Mapping Issues: The specification explicitly allows older code pages to be mapped incorrectly.

Frequently Asked Questions

What is the difference between RTF and plain text?

Plain text contains only characters without any styling. RTF (Rich Text Format) includes control codes that tell the software how to display the text, such as bolding, italics, and font changes.

Is RTF still being updated?

No. Microsoft discontinued enhancements to the RTF specification after version 1.9.1 in 2008. New features in Word 2010 and later versions are not supported in RTF.

Why would someone use RTF instead of DOCX?

RTF is often used for basic cross-platform compatibility because it can be opened by a wide variety of word processors, including legacy software and simple text editors, without requiring a full installation of Microsoft Word.

How does RTF handle non-English characters?

RTF uses code page escapes (hexadecimal sequences) for older versions and Unicode escapes for versions 1.5 and later to represent characters outside the standard 7-bit ASCII range.

References

  1. "Text Media Types". iana.org. 1993-06-08. Retrieved 2010-03-13.
  2. "Application Media Types". iana.org. 2007-06-18. Retrieved 2010-08-20.
  3. Microsoft Corporation (May 1999). "Rich Text Format (RTF) Specification, version 1.6". Retrieved 2010-03-13.
  4. Microsoft Corporation (2004-04-20). "Word 2003: Rich Text Format (RTF) Specification, version 1.8". Microsoft. Retrieved 2010-03-13.
  5. John Siracusa (2005-04-28). "Mac OS X 10.4 Tiger – File types revisited". Retrieved 2010-03-13.