EPUB 3 - UTF-8 BOM on Every XML Part
The package document, the navigation document and the chapter each begin with a UTF-8 byte order mark before the XML declaration. Legal, and the classic reason a strict parser reports content before the prolog on a file that looks perfectly fine in an editor.
- mimetype
- container.xml
- content.opf
- nav.xhtml
- style.css
- chapter1.xhtml
Specifications
- Seed
- 20260807
- Epub Version
- 3.0
- Bom Bytes
- EF BB BF
- Parts With Bom
- content.opf, nav.xhtml, chapter1.xhtml
- Declared Encoding
- UTF-8
- Container Xml Has Bom
- false
Testing contract
Expected to recover- Scenario
- Parse each XML part in the container with a strict XML parser.
- Expected result
- The BOM is consumed as an encoding signature rather than as document content; no part reports a stray character before the XML declaration, and the title reads correctly.
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 - UTF-8 BOM on Every XML Part” is a deterministic Testaroo fixture for Encoding detection, Metadata testing, Error handling. 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 bom-on-every-xml-part.epub out.pdf # Calibre
unzip -l bom-on-every-xml-part.epub # EPUB is a ZIPGenerated by generation/ebooks_p7.py. Free for any use, no attribution required, license.
Related files
- csvAlder Table Bistro: Inventory count sheet as transcribedInventory count sheet as transcribed for Alder Table Bistro. The same closing counts as inventory-count-sheet.csv, in the shape a paper count actually arrives in. CRLF line endings, a UTF-8 byte order mark, a semicolon delimiter and a decimal comma. Two blank lines, one section banner that is not a record, one ingredient split across two locations, one counted as whole packs plus a remainder, one superseded mid-shift row at 14:20, trailing whitespace in three fields, a leading-zero bin code, an empty bin code, and one record carrying ten fields where the header declares 9. Every quirk is named in README.md.

- csvCedar Street Tacos: Inventory count sheet as transcribedInventory count sheet as transcribed for Cedar Street Tacos. The same closing counts as inventory-count-sheet.csv, in the shape a paper count actually arrives in. CRLF line endings, a UTF-8 byte order mark, a semicolon delimiter and a decimal comma. Two blank lines, one section banner that is not a record, one ingredient split across two locations, one counted as whole packs plus a remainder, one superseded mid-shift row at 14:20, trailing whitespace in three fields, a leading-zero bin code, an empty bin code, and one record carrying ten fields where the header declares 9. Every quirk is named in README.md.

- csvCopper Oven Bakery: Inventory count sheet as transcribedInventory count sheet as transcribed for Copper Oven Bakery. The same closing counts as inventory-count-sheet.csv, in the shape a paper count actually arrives in. CRLF line endings, a UTF-8 byte order mark, a semicolon delimiter and a decimal comma. Two blank lines, one section banner that is not a record, one ingredient split across two locations, one counted as whole packs plus a remainder, one superseded mid-shift row at 14:20, trailing whitespace in three fields, a leading-zero bin code, an empty bin code, and one record carrying ten fields where the header declares 9. Every quirk is named in README.md.

- jsonCycloneDX SBOM With Unicode Metadata (Edge Case)A CycloneDX SBOM whose author names and properties contain accented Latin, CJK, right-to-left Hebrew, emoji and a deliberately long property value, for testing encoding handling and field-width assumptions. Every package, version, hash and licence is fictional: the tree describes nothing real.

- csvEmber Lane Pizza: Inventory count sheet as transcribedInventory count sheet as transcribed for Ember Lane Pizza. The same closing counts as inventory-count-sheet.csv, in the shape a paper count actually arrives in. CRLF line endings, a UTF-8 byte order mark, a semicolon delimiter and a decimal comma. Two blank lines, one section banner that is not a record, one ingredient split across two locations, one counted as whole packs plus a remainder, one superseded mid-shift row at 14:20, trailing whitespace in three fields, a leading-zero bin code, an empty bin code, and one record carrying ten fields where the header declares 9. Every quirk is named in README.md.

- csvHarbour Kitchen Group: Inventory count sheet as transcribedInventory count sheet as transcribed for Harbour Kitchen Group. The same closing counts as inventory-count-sheet.csv, in the shape a paper count actually arrives in. CRLF line endings, a UTF-8 byte order mark, a semicolon delimiter and a decimal comma. Two blank lines, one section banner that is not a record, one ingredient split across two locations, one counted as whole packs plus a remainder, one superseded mid-shift row at 14:20, trailing whitespace in three fields, a leading-zero bin code, an empty bin code, and one record carrying ten fields where the header declares 9. Every quirk is named in README.md.
