poka.sh

Docs

DOC

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

DOC Preview (Word 97-2003).

At a glance

Original creator Microsoft
First published 1997
Purpose The binary Word document format of Word 97 to Word 2003: text, tables, notes and formatting in an OLE2 compound file.
Extensions .doc
Poka parser poka-doc
Viewer poka-text-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B3 Core (see Breadth tiers)

How much Poka reads

B3 Core. Only the main content type or types are decoded (for example geometry but not materials, layers or annotations, or only one version family). The list of gaps is substantial.

Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16: parsers/poka-doc/src/lib.rs (piece-table reader for Word 97-2003 nFib 193 and above, Word 6/95 single-run reader, Word 1.x/2.x flat-file reader, RTF-under-.doc, heuristic fallback), its unit tests and tests/samples.rs over the 6 corpus .doc files (testWORD, testWORD_features, testWORD_numbered_list, testWORD6, NEWSSLID.DOC) plus the corpus .wbk. Covers Word 97-2003 saves (including later Word saves in this format), non-fast-saved Word 6/95, and non-fast-saved Word 1.x/2.x. Output is plain text only (TextAst).

What Poka does not read

  • Character and paragraph formatting (bold, italic, fonts, headings, styles)
  • Pictures, drawn shapes and embedded OLE objects
  • Table structure (cells become tab-separated text; no borders, merged cells or row layout)
  • Lists and numbering (bullets and numbers not shown)
  • Hyperlink targets (only the visible link text is kept)
  • Tracked changes (revision marks are not read, so deleted and inserted text look alike)
  • Page layout, columns, sections and header/footer placement
  • Fields other than their cached result (page numbers, TOC structure)
  • Encrypted Word 97+ files (fall back to a printable-text scan, not decrypted)
  • Fast-saved or encrypted Word 6/95 files (heuristic scan only)
  • Fast-saved or encrypted Word 1.x/2.x files (named but not read)
  • Word for DOS files and WordPerfect saved as .doc (identified only)

Background

The Library of Congress counts four generations of files with the .doc extension: Word for DOS; Word for Windows 1 and 2 (and Word 3 and 4 for Mac); Word 6 and Word 95; and Word 97 and later. Its page describes the last, which was Word's default format from Word 97 (1997) to Office 2003 and was replaced as the default by DOCX in Word 2007. Since Word 6.0 (1993) a .doc file has been an OLE2 compound file. Microsoft has documented the format as [MS-DOC] under its Open Specification Promise since 2007. Poka shows the document's text, with footnotes, headers and footers, comments, endnotes and text boxes each under its own heading; it does not reproduce page layout.

Versions

Version Identifier Poka Note
Word for DOS, Word for Windows 1 and 2 Partly read Flat files before the OLE2 container. Unencrypted Word 1.x and 2.x files that were not fast-saved are read as text (word2_text; corpus test corpus_word_2_flat_file_is_read); poka-doc says which era the file is from.
Word 6 and Word 95 Partly read nFib 101 to 105. Text is read directly from a file saved without fast-save; a fast-saved or encrypted file falls back to a heuristic scan for printable text, and the header says so.
Word 97 to Word 2003 (and later saves in this format) FIB nFib 0x00C1 (193) Read The piece table is followed in character order, Windows-1252 and UTF-16 pieces alike (parsers/poka-doc/src/lib.rs). An encrypted file falls back to a scan for printable text.
  • Word binary document and backup (.docb, .wbk): Routed to poka-doc in parsers/aliases.toml. A .wbk backup is either an OLE2 .doc or RTF, depending on the document it backs up.

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

Sources