How to Convert a Manuscript to EPUB Without Encoding Errors

A book-wide EPUB 化 やり方 starts with an encoding inventory, not a batch conversion. Inspect every chapter, isolate exceptions, preserve every original, and create UTF-8 results in a separate folder. A majority of UTF-8 chapters does not prove that the remaining files use the same encoding. One legacy chapter can introduce garbled names into an otherwise clean EPUB.

Build an inventory before changing a byte

Give every source file a row containing chapter position, filename, modification time, detected encoding, line ending, character count, and conversion status. Do not use a file extension as the encoding value. A .txt file may have passed through several editors over many years.

Keep the source set read-only. Put converted files in a different directory and preserve a clear one-to-one relationship between source and result. This arrangement is essential at book scale: if two files share a name and no parent folder is recorded, the EPUB builder can receive the wrong version.

Add editorial anchors to each row. A chapter title, a proper name, distinctive punctuation, and the final sentence are useful. They allow a reviewer to compare meaning after conversion, not merely file sizes.

Route exceptions before running the batch

Sort chapters with a minority encoding, an unconvertible candidate, or an unusual character count into an exception queue. Test the hardest representative file first. A method that fails on the exception should not be applied to twenty ordinary chapters and one difficult chapter together.

The retained control for this guide was a three-line synthetic Shift_JIS manuscript. Rune’s text inspection reported Shift_JIS, LF, 36 characters, and no unconvertible candidates. A separately named conversion reopened as UTF-8, LF, and the same 36-character count.

That result establishes a clean round trip for one known sample. It is not evidence about unseen chapters, already-corrupted bytes, or missing font glyphs. Each real source still needs its own inventory row.

Convert into a controlled destination

Use the detected source encoding in the conversion command and write to the UTF-8 result directory. Capture exit status and diagnostic output. Do not delete the original when the command exits successfully.

Reopen the result with an inspector. Confirm UTF-8, the intended line ending, and a plausible character count. Then compare the editorial anchors in context. Equal counts can still conceal substitutions of the same length, so a semantic check remains necessary.

Approve chapters one at a time. Move only approved UTF-8 results into the export selection. Mixing approved, pending, and original files in one folder makes a later package difficult to audit.

If a conversion fails, correct that chapter’s source interpretation. Do not change the settings for chapters that have already passed unless the evidence indicates a shared cause.

Check continuity across chapter boundaries

A single-chapter diagnostic cannot reveal a swapped order or a missing transition. After every file has a UTF-8 result, read the ending of one chapter together with the beginning of the next. Check numbering, dates, narrator changes, and notes that cross the boundary.

Compare the approved sequence with the files supplied to the EPUB builder. Alphabetical filename order may differ from editorial order. Record the exact selection so the package result can be traced back to the chapter inventory.

This continuity pass gives the book-wide workflow its distinct purpose. It is broader than choosing an encoding from one sample and earlier than the final approved-manuscript handoff.

Reopen the EPUB as a collection

The small retained control exported successfully after conversion. Its package contained title, nav, one body XHTML, and colophon; nav.xhtml and NCX both reached the body. Local inspection returned valid=true and zero missing resources.

For a real book, compare the number and order of body items with the approved inventory. Inspect navigation destinations, image references, and missing resources. Text conversion can pass while the package omits a chapter, so encoding approval and package approval need separate columns.

Rune Studio’s public documentation describes graphical warnings for unconvertible characters. Those UI behaviors were not observed in this CLI run. Retailer acceptance, font coverage, and identical rendering across readers were also not tested.

Define a whole-book release rule

Count pending and excluded chapters as well as approved ones. Reporting “19 of 19 passed” can hide a twentieth chapter that never entered the conversion list. A summary such as “19 approved, 1 pending, 0 excluded, 20 expected” keeps scope visible and prevents a convenient denominator from replacing the book plan.

When a chapter is replaced after editorial corrections, quarantine the older converted result and record the new hash. Before export, search the selection directory for duplicate basenames and confirm that only the latest approved copy can be chosen. This final input check prevents a valid conversion from being undermined by an obsolete chapter.

For collaborative work, assign one person to maintain the source inventory and another to compare the generated spine with it. The separation is useful because expected order and observed order remain independent records. If the lists differ, the team can inspect a specific row instead of rebuilding the entire publication.

For chapter-set normalization, every chapter needs a preserved source, a recorded detected encoding, a separately named UTF-8 result, a successful reopen check, and approved editorial anchors. The chapter sequence and boundary continuity must match the book plan. Finally, the EPUB must contain the expected body items and no missing package resources.

This workflow suits editors consolidating manuscripts created in different tools or periods on a Mac. A one-chapter uncertainty is better handled as a diagnostic pilot; damaged data needs a recovery workflow; final delivery needs its own immutable approved source. Start by listing every chapter and sorting the encoding column. The outliers, not the majority, should determine the first conversion test.