This website is being built. Services described here are not yet available to order; the free tools work now. See what is ready.
SelfPublishingTool

Manuscript preparation

Hunting Gremlins: Invisible Unicode Characters That Break Typesetting Software

On 22 November 2023, a user of the Posit Community forum reported that a batch of automatically generated reports had stopped compiling. The log gave the reason in two lines: “! LaTeX Error: Unicode character (U+200B)” and “not set up for use with LaTeX.” The offending character sat inside the phrase “BCL (Law & Irish),” between the “L” and the “aw,” and it had arrived with the data rather than with the template. With more than one hundred reports to produce, the user could not fix each by hand.1 The case is small, but it shows the whole problem in miniature. Invisible Unicode characters look like nothing on screen, travel silently through copy and paste, and surface only when a stricter piece of software meets them, usually at the typesetting stage, when time is shortest.

Authors who prepare their own files, or who hand Word documents to a typesetter, benefit from knowing which of these characters exist, what each is supposed to do, how they enter a manuscript, and how to find them before a layout program or an ebook converter does. This article covers those four points, drawing on the Unicode Standard and on documented cases from the software people actually use.

Invisible characters are defined features of Unicode, not corruption

The characters that cause trouble are not errors in the encoding. Each one has a defined job in the Unicode Standard, and most of them are described in Chapter 23, “Special Areas and Format Characters,” of the core specification. As of the Unicode 16.0.0 text, the standard describes U+200B ZERO WIDTH SPACE as a character that “indicates a word break or line break opportunity” without adding visible space.2 It is useful in scripts such as Thai that do not separate words with spaces, and in long URLs where a line may need to break.

The same chapter describes several relatives. U+00A0 NO-BREAK SPACE “has the same width as U+0020 SPACE,” but signals that “under normal circumstances, no line breaks are permitted between it and surrounding characters.” U+00AD SOFT HYPHEN “indicates an intraword break point, where a line break is preferred” if the word must be divided, and otherwise stays invisible. U+2060 WORD JOINER prevents a line break without adding width. U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are, in the standard’s words, “the default form of denoting line and paragraph boundaries in Unicode plain text,” although most word processors use their own paragraph marks instead.3

Many of these characters carry a property called Default_Ignorable_Code_Point. The standard applies it, for example, to the combining grapheme joiner, to variation selectors, and to the bidirectional overrides, embeddings, and isolates used in right-to-left text.4 The Unicode Consortium’s guidance on display states that “All default ignorable characters should be rendered as completely invisible” when software does not explicitly support them, taking up no horizontal space.5 That recommendation is sensible for readers, who should not see control codes. For a production editor, it means that a whole class of characters is invisible by design.

The byte order mark is the most common stowaway

The character most likely to appear in an author’s files without anyone typing it is U+FEFF. According to the Unicode Consortium’s FAQ, “A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream,” where it acts as a signature identifying the encoding. In UTF-8, the encoding most text files now use, the BOM is the byte sequence EF BB BF.6

The FAQ is clear that a BOM belongs only at the start of a stream. It states that “when not at the beginning of a text stream, U+FEFF should normally not occur,” and it warns against tagging every string with a BOM, since doing so “complicates string concatenation.” The FAQ also observes that “two data fields may have precisely the same content, but not be binary-equal,” which is exactly the condition that makes a search fail.7 When several text files are joined together, as happens when chapters exported separately are merged into one file, each file’s BOM can end up in the middle of the combined text.

U+FEFF has a second, older identity. For backward compatibility, the FAQ says, it “should be treated as ZERO WIDTH NON-BREAKING SPACE (ZWNBSP),” while “The use of U+2060 WORD JOINER is strongly preferred over ZWNBSP for expressing word joining semantics.”8 A stray U+FEFF therefore behaves as an invisible glue between two letters. Adobe InDesign users have documented this directly. In a November 2021 thread on Adobe’s community forum, a user asked how to delete “this character 0xFEFF (ZERO WIDTH NO-BREAK SPACE) between two letters.” Respondents suggested a text Find/Change for <feff> with an empty replacement, and a later user reported that a similar search removed 3,397 instances.9

The same thread contains a caution that matters for anyone cleaning a layout file rather than a manuscript. A community expert noted that InDesign uses the same code internally for other objects, including index markers, notes, and hyperlink anchors, so a blanket deletion can remove things the book needs.10 The safer place to remove stray U+FEFF characters is the source manuscript, before it is placed in a layout program.

Copy and paste is the main route into a manuscript

Invisible characters enter manuscripts mostly through text that was not typed in the document where it now lives. Common sources include passages pasted from web pages, quotations copied from PDFs, notes moved between writing applications, and data exported from databases or content management systems. The Posit case is typical: the zero width space came from the underlying data, not from the author’s writing.11

Translators, who handle large volumes of imported text, have catalogued the effects in detail. In a January 2025 post, the translation consultant Kevin Lossner described tracing a “troubled word” to U+200B and noted that “Older formats for MS Word (DOC) and RTF frequently have them.” He reported that macros used to split multilingual files had caused “these zero-width characters to be inserted randomly in words.”12 The symptoms he listed apply equally to book production: searches fail to find words that are visibly on screen, double-clicking selects only part of a word, glossary lookups do not trigger, and exact matches in translation memory are reported as fuzzy.13

The keyboard is a smaller but real source. The Chicago Manual of Style’s CMOS Shop Talk notes that in desktop Word a nonbreaking space is typed with “Ctrl+Shift+Space (Windows) or Option-Space (Mac).”14 On a Mac, a nonbreaking space can therefore result from holding Option a fraction too long before pressing the space bar. Microsoft Word also offers a “no-width optional break,” which Allen Wyatt’s WordTips describes as a character Microsoft introduced “Beginning in Word 2000” and which corresponds to Unicode value 8203, the decimal form of U+200B.15 An author or editor who once used that feature to allow breaks in long web addresses may have left zero width spaces throughout a file.

Each kind of software fails in its own way

The same invisible character can pass unnoticed in one program and stop another. Word processors and browsers generally follow the Unicode recommendation to show nothing.16 Professional typesetting tools are less forgiving, and they fail in at least four distinct ways.

The first failure is a hard stop. Under the standard LaTeX setup used by many automated publishing pipelines, a character that has no defined mapping produces a fatal error, as in the Posit report.17 The manuscript does not compile at all until the character is removed or defined.

The second failure is a silent omission. The TeX FAQ explains that when a font lacks a glyph for a character, “There’s no actual error message, either: you have to read the log file,” where TeX records lines such as “Missing character: There is no ^^a3 in font cmr10!”18 A book can therefore compile successfully and still be missing characters, which only a careful reading of the log or the proof will reveal.

The third failure is a visible substitute. The Unicode guidance says that characters other than whitespace and default ignorables should be shown, when unsupported, with “one or more generic glyphs, often referred to as ‘missing glyphs’ or a ‘.notdef glyph’.”19 In print this appears as an empty box; in an ebook it may appear as a question mark in a box. Amazon’s “Guide to Kindle Content Quality” lists “Unsupported characters” among the issues it checks, describing them as “strings of jumbled characters or boxed question marks,” and it separately lists “Junk characters” among typographical errors.20 As of November 2026, that page treats these as quality problems that readers may report.

The fourth failure concerns layout rather than visible glyphs. A stray nonbreaking space prevents a line break where one is needed, which can produce a loose, overstretched line in justified text. A stray soft hyphen can cause a word to break at an unexpected point. A stray zero width space allows a line to break in the middle of a word with no hyphen at all. None of these produces an error message; each simply makes the page worse.

Search failures are the earliest warning sign

Before any of these characters reaches a typesetter, they usually reveal themselves through search. If a global find for a character name returns fewer hits than expected, or a spell checker flags a correctly spelled word, an invisible character inside the word is a likely explanation. The Unicode FAQ’s point that identical-looking text need not be “binary-equal” is the technical reason.21

A related problem is not strictly invisible but behaves the same way. Accented letters can be stored in two forms: as a single precomposed character, or as a base letter followed by a combining accent. The Python documentation for its unicodedata module gives the example that “U+00C7 (LATIN CAPITAL LETTER C WITH CEDILLA) can also be expressed as the sequence U+0043 (LATIN CAPITAL LETTER C) U+0327 (COMBINING CEDILLA),” and warns that “Even if two unicode strings are normalized and look the same to a human reader, if one has combining characters and the other doesn’t, they may not compare equal.”22 A name that appears in a manuscript in both forms will look identical on the page but will be indexed, searched, and sometimes kerned as two different words.

Word, InDesign, and scripts can each locate the characters

Microsoft Word can find several invisible characters with its special search codes. The search strings collected from Ed Bott and Carl Siechert’s Microsoft Office 2010 Inside Out, published on Microsoft’s TechNet archive, include ^s for a nonbreaking space, ^- for an optional hyphen, ^~ for a nonbreaking hyphen, and ^l for a manual line break.23 CMOS Shop Talk recommends that copyeditors “start with a clean slate” by replacing stray nonbreaking spaces with regular ones before adding any that the text needs, and notes that Google Docs lacks an equivalent code, so the character itself must be pasted into the search box.24 Turning on Word’s display of formatting marks shows nonbreaking spaces and optional hyphens, but zero width spaces and byte order marks generally remain invisible even then.

InDesign’s text Find/Change accepts a Unicode value in angle brackets, as the <feff> example shows.25 The same approach works for <200b> and other code points. Because InDesign reuses U+FEFF for its own markers, it is prudent to check the index and hyperlinks after any such replacement.26

For authors comfortable with a short script, the most thorough method is to scan the plain text of the manuscript and report every character whose Unicode general category is “Cf” (format characters), together with any no-break spaces and line or paragraph separators. Python’s unicodedata.category() returns the two-letter category for any character, and unicodedata.name() returns its formal name, so a list such as “ZERO WIDTH SPACE at line 204” can be produced from a few lines of code.27 The Unicode guidance also notes that some rendering systems offer a “Display Hidden” mode with visible glyphs for default ignorable code points, which serves the same purpose in an editor that supports it.28

Some invisible characters are legitimate and should stay

Removal is not always the right answer. The CMOS Shop Talk post states that “nonbreaking spaces are essential in spaced ellipses” in Chicago style, and many publishers use them between initials or before units of measure.29 Text in Arabic, Hebrew, Persian, or Indic scripts may depend on zero width joiners, zero width non-joiners, and bidirectional controls for correct shaping and ordering, and the Unicode Standard defines those characters precisely for that purpose.30 Emoji sequences also depend on joiners and variation selectors.

The security literature shows why careful handling still matters. In “Trojan Source: Invisible Vulnerabilities,” presented at the 32nd USENIX Security Symposium in 2023, Nicholas Boucher and Ross Anderson of the University of Cambridge showed that “subtleties in text-encoding standards such as Unicode” can make source code appear “different to a compiler and to the human eye.”31 A manuscript is not a program, but the underlying lesson transfers directly: what a reader sees on screen is not a reliable account of what the file contains.

A sound working rule is to inventory before deleting. The author or editor lists every invisible character found, decides for each type whether it is intended, removes the unintended ones from the source manuscript, and documents any that should remain so that the typesetter knows to preserve them. This is the same discipline that a style sheet applies to spelling and capitalization, extended to characters that cannot be seen.

A manuscript cleanup sequence for typesetting

For a book written mainly in English, the following sequence addresses the problems described above in a sensible order:

  1. Before merging chapter files, check for a byte order mark at the start of each file and confirm that the merged file contains U+FEFF only, if at all, at its very beginning.32
  2. Search for zero width spaces (U+200B) and word joiners (U+2060) and remove those that are not intended, particularly inside words and names.33
  3. Search for nonbreaking spaces with ^s in Word, replace stray ones, and then reinsert only those that the style guide requires.3435
  4. Search for optional hyphens with ^- and remove any that were added by hand in an earlier draft, since the typesetter’s hyphenation settings will apply anyway.36
  5. Run a character inventory by Unicode category, or use a hidden-character display, to catch anything the targeted searches missed.3738
  6. After typesetting, read the TeX log or the equivalent preflight report for missing characters, and examine the proof and the ebook preview for boxes and question marks.3940

The list does not need to be repeated at every draft. It is most efficient when run once on the final manuscript, after the last round of pasted additions and before the file goes to layout, and then a second time on any late corrections.

Detection has limits that a final proof must cover

No search catches everything. A targeted find locates only the characters someone thought to search for, and a category scan reports format characters but cannot judge whether a nonbreaking space between two words is deliberate. Some layout programs normalize or strip certain characters on import, which can hide a problem in one output while it persists in another format made from the same source. Ebook conversion adds another layer, because a reading system may substitute a font that lacks a glyph the print font contained.4142

For that reason the final defense remains a careful reading of the proof in every format that will be sold, combined with a search of the typesetting log for missing-character warnings. The characters are invisible on screen, but their effects, such as a box where a letter should be, a word broken without a hyphen, or a line stretched across the measure, are visible to a reader who looks for them.

Platform rules, fees and laws change. Facts in this guide are dated to when they were checked; confirm current terms with the platform or authority before relying on them. Nothing here is legal, tax or financial advice.

More guides Free publishing tools