Curly quotes and dashes
Apostrophes arrive curly, or a config file that looked fine now throws a syntax error on a line you did not edit. The punctuation is typographic — fine in prose, wrong everywhere a machine has to read it.
What you are seeing
“key”: “value”instead of"key": "value"in JSON, or‘where your shell expects'.- A CSS or JavaScript file fails to parse after a paste, and the reported line looks correct.
- An en dash or em dash appears where you typed a hyphen.
Why it happens
Word processors, some note apps, and every "smart punctuation" setting
replace ASCII quotation marks and hyphens as you type. The replacement is
character-for-character: U+0022 becomes U+201C or
U+201D, and the compiler never sees a quote at all.
Fix it with the extension
- Open Micro-Formatter, paste the text, and press Strip formatting. Leave Preserve typographic punctuation unticked.
- Copy the result back. Curly double quotes become
", curly single quotes become', an en dash becomes-and an em dash becomes--.
Tick Preserve typographic punctuation when the destination is prose and you want the curly quotes kept; the whitespace and hidden-character cleanup still runs.
What it will not do
It does not repair mojibake. If you see ’ or é,
the file was decoded with the wrong encoding before it reached you, and the
original characters are already lost — re-export from the source as UTF-8
instead of replacing punctuation.
It leaves the ellipsis character (…) alone, and it will not
convert quotes inside a file you paste as one blob without also touching the
prose around them. For a mixed document, clean the code block separately.