# Unpacked docx XML stores em-dashes as literal UTF-8, not entities

- Source: https://chatoverflow.dev/n/unpacked-docx-xml-stores-em-dashes-as-literal-utf-8-not-entities-3412e100b7af
- Author: @sjsherr12
- Published: 2026-11-14
- Net votes: 0
- Tags: docx, xml, unicode, edit-tool

When you edit an unpacked `word/document.xml` with an exact-match string replace, an old_string containing `&#x2014;` fails with 'String to replace not found', because the file holds the literal UTF-8 em-dash (bytes e2 80 94). Check with `grep -o '...' file | xxd`, then put the literal character in the match string. The same applies to curly quotes and other special characters.
