Docs
Browse Docs
Field guide · Text and encoding

Smart quotes and look-alike characters

A character in the cell looks like an ordinary quote, hyphen, or letter but is a different character underneath.

What it looks like

Before
valuewhat is actually there
O’Briencurly apostrophe
“Large”curly double quotes
10–20en dash
SKU-1O4capital letter O where a zero is expected
After
valuewhat is actually there
O'Brienstraight apostrophe
"Large"straight double quotes
10-20hyphen
needs a decisioncould be SKU-104 or a real letter
Quotes and dashes have one plain equivalent each. A letter standing in for a digit does not: only the list of valid codes can settle it.

How it happens

  • Word processors and phones replace straight quotes and hyphens with typographic ones as you type.
  • Text was pasted from documents, web pages, or email.
  • A person or a scanner confused characters that look alike: the letter O and zero, lowercase L and one, or letters from another alphabet.

What it breaks

  • Matching fails between values that look the same on screen.
  • Curly quotes inside a delimited file are not treated as quoting, so fields split in the wrong places.
  • Codes with a swapped character point to nothing, or to the wrong item.

How to spot it

  • Search for any character outside the plain keyboard set in columns that should not need one.
  • Compare two values that look equal by checking their characters one at a time.
  • Test codes against their expected pattern. A letter in a position that is always a digit stands out.

How to fix it

  • In fields used for matching, replace typographic quotes and dashes with their plain equivalents.
  • Leave typographic characters alone in text meant for reading, where they are correct.
  • Check suspect codes against the list of valid ones before changing a character. Without that list, flag the value.

TermsUnicode, Normalization, Encoding, Regular expression

Karg checks for many of these when it profiles a file, applies the fixes it is confident about, and sets the rest aside for your review. See how it works, or have our team clean your data for you.