CS Fundamentals beginner 8 min

Find the Character That Broke a Copy-Paste Flow

Inspect invisible characters before blaming validation, rendering, or a teammate's paste.

Scenario

A product name looks identical on two screens, yet "Plan A - launch" === "Plan A - launch" returns false after someone pasted the value from a spreadsheet. This is the classic invisible-character bug: a non-breaking space, zero-width space, or smart dash that survives copy-paste and breaks equality checks, lookups, and deduplication. Stop squinting at the string and inspect its actual code points.

Broken input

Plan A - launch

Goal

Use ASCII / Unicode Explorer to identify the hidden or look-alike character that makes the pasted string different from the expected value. The explorer shows each character's code point, so two visually identical strings stop being a mystery.

Tool sequence

  1. Open ASCII / Unicode Explorer.
  2. Paste the failing string straight from the spreadsheet — retyping it destroys the evidence.
  3. Walk the character list and compare each code point against what you expect: ASCII letters, digits, and U+0020 spaces.
  4. Note any character outside plain ASCII — here the space before the hyphen reports as U+00A0 (no-break space) instead of U+0020.
  5. Fix the source data, then re-paste and confirm every character reads as plain ASCII; use HTML Entity Encoder / Decoder if the string came from scraped HTML with   in it.

Checkpoint output

P  U+0050   a  U+0061   ...
   U+00A0  ← no-break space, expected U+0020
-  U+002D

The space before the hyphen is a non-breaking space (U+00A0), not a regular ASCII space — that one byte difference is why the equality check fails.

Common mistakes

  • Re-typing the string and losing the evidence you were supposed to inspect.
  • Checking only character count — U+00A0 and U+0020 are both one character.
  • Fixing display CSS before confirming the underlying text data is what you think it is.
  • Cleaning the one visible occurrence and missing the same invisible character elsewhere in the dataset.

Related tools and lessons