# PKG-009: forbidden file name character, how to fix it

Source: https://epubcc.com/epubcheck/pkg-009/ (updated 2026-11-04)

EPUBCheck PKG-009 is an error message: “The file name "…" contains characters that are not allowed in OCF file names: ….” A file name inside the EPUB contains a character that the EPUB container rules do not allow in file names. The restriction exists so that the same names work on every operating system that unpacks the book.

- Official message (EPUBCheck 5.4.0): The file name "%1$s" contains characters that are not allowed in OCF file names: %2$s.
- Default severity: Error

## Typical causes

- Characters such as ", *, :, <, >, ?, \ or |, or control characters, usually copied from the original title of an image or chapter.
- Files exported from a tool that names them after headings or captions.

## How to fix it

1. Rename the file using letters, digits, hyphens and underscores.
2. After renaming, update every reference to the file: the manifest in the package document, links and image sources in the XHTML, and url() references in the CSS.
3. Rebuild the archive and validate again; any reference you missed shows up as RSC-007.

## When it's not this

Spaces are allowed and only give the PKG-010 warning; non-ASCII letters give PKG-012.

## Sources

- EPUB 3.3, §4.2.3 File paths and file names: https://www.w3.org/TR/epub-33/#sec-container-filenames (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
