EPUB 3 - Metadata Written as Numeric Character References
Every non-ASCII character in the metadata is written as a hexadecimal numeric character reference, so the package document is pure ASCII on disk while the title is Han and Cyrillic once parsed. For testing tools that read metadata with a regex instead of an XML parser.
- mimetype
- container.xml
- content.opf
- nav.xhtml
- style.css
- chapter1.xhtml
Specifications
- Seed
- 20260807
- Epub Version
- 3.0
- Opf Encoding
- UTF-8
- Title Is Ascii
- true
- Escaped Scripts
- Han, Cyrillic
- Reference Form
- hexadecimal (&#xNNNN;)
Testing contract
Expected to pass- Scenario
- Read dc:title and dc:subject and display them in a library listing.
- Expected result
- An XML parser yields the decoded Han and Cyrillic text; anything that shows the raw &#x.... sequences is reading the file as text rather than as XML.
What is a .epub file?
EPUB is the open e-book standard, a ZIP archive containing XHTML content documents, CSS, images, and a package manifest describing reading order and metadata. It supports reflowable text that adapts to screen size and is supported by most e-readers except Kindle natively. It is the dominant format for distributable e-books.
How to use this file
Use an example EPUB to test e-book parsing, ZIP-package and manifest handling, reading-order and metadata extraction, and rendering in e-reader applications.
How to use this file for testing
“EPUB 3 - Metadata Written as Numeric Character References” is a deterministic Novus Examples fixture for Encoding detection, Metadata testing. UTF-8, UTF-8-BOM, UTF-16, and Latin-1 files with documented encodings and line endings for testing charset detection.
Documented properties for this file: seed 20260807. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
E-book fixtures are structured archives documented down to their spine and manifest. Test readers and converters, and where a valid↔intentionally-invalid pair exists, assert graceful handling of the malformed container.
Code examples
ebook-convert numeric-character-references.epub out.pdf # Calibre
unzip -l numeric-character-references.epub # EPUB is a ZIPRelated files
- cpgShapefile — Code Page Sidecar (.cpg, UTF-8)A one-line sidecar naming the encoding of the .dbf. Without it a reader has to guess — usually cp1252 — and every non-ASCII attribute value comes back as mojibake, which is the single most common shapefile data-loss bug.

- cpgShapefile Code Page — ISO-8859-1 DeclarationThe sidecar that declares `attributes-cp1252.dbf` as ISO-8859-1. Note that the DBF also carries a language-driver byte in its header, and the two can disagree — which is exactly the ambiguity a reader has to resolve and document.

- cpgShapefile Code Page — UTF-8 DeclarationThe sidecar that declares `attributes-utf8.dbf` as UTF-8. Note that the DBF also carries a language-driver byte in its header, and the two can disagree — which is exactly the ambiguity a reader has to resolve and document.

- zipZIP - Info-ZIP Unicode Path Extra FieldThe third way a ZIP carries a non-ASCII name: an ASCII-safe name in the header plus an Info-ZIP Unicode Path extra field (0x7075) holding the real UTF-8 name and a CRC32 of the header name. A reader must prefer the extra field, but only while that CRC still matches the header name it was computed from.

- azwConvert v2 DRM-Free AZW E-bookDRM-free AZW/MOBI7 e-book source copied byte-for-byte from the catalog's valid reader fixture for legacy import testing. Stable P8 artifact p8-convert-legacy-azw.

- cbrConvert v2 Two-Page CBR ComicValid CBR comic container with two deterministic PNG pages in lexical reading order for legacy comic conversion. Stable P8 artifact p8-convert-legacy-cbr.

Generated by generation/ebooks_p7.py. Free for any use, no attribution required — license.