Skip to content
EPUBCheck · Package and ZIP container

PKG-009

Updated:

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 official message

The file name "%1$s" contains characters that are not allowed in OCF file names: %2$s.

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • Characters such as ", *, :, <, >, ?, \ or |, or control characters, usually copied from the original title of an image or chapter.

How to fix it

  • Rename the file using letters, digits, hyphens and underscores.
  • 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.

Terms used here

Other PKG messages

  • PKG-010 The file name "…" contains spaces, which may create interoperability issues with older reading systems.
  • PKG-007 The content of the mimetype file must be the string "application/epub+zip"…
  • PKG-011 The file name "…" is not allowed to end with ".".
  • PKG-006 Mimetype file entry is missing or is not the first file in the archive.
  • PKG-012 The file name "…" contains non-ASCII characters, which might create interoperability issues with older reading systems.
  • PKG-005 The mimetype file has an extra field of length …. The use of the extra field feature of the ZIP format is not permitted for the mimetype file.

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.

FAQ

What does EPUBCheck PKG-009 mean?

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.

Is PKG-009 an error?

PKG-009 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.