Skip to main content

Questions · Text Tools · 2 min read

Why Did My Text Turn Into Weird Characters?

You are seeing mojibake: text saved using one character encoding was displayed using another, so multi-byte characters like curly quotes and accented letters got misread as sequences of unrelated symbols. The underlying text is usually intact; fixing means re-decoding with the right encoding, not retyping.

What actually went wrong

Computers store characters as numbers, and encodings are the agreements about which number means which character. UTF-8, the modern universal standard, uses one to four bytes per character. Older single-byte schemes like Latin-1 had only 256 values. When UTF-8 text containing a curly apostrophe (three bytes) is read as Latin-1, those three bytes render as three wrong characters, classically "’" where an apostrophe belonged.

Double-encoding makes it worse: text converted through mismatched encodings twice produces longer garbage chains like "é" for a simple é. The pattern of repetition is actually diagnostic: regular, repeating corruption points squarely at encoding rather than data loss.

Where it strikes most often

CSV exports opened in Excel, old databases migrated to new systems, copy-paste between legacy applications, and files edited across different operating systems are the classic breeding grounds. Email forwards through old servers earned notoriety decades ago and still occasionally deliver.

Smart quotes and em dashes are the most frequent victims because word processors insert them automatically while plain-text environments expect straight quotes. An entire document can look ruined because of a handful of punctuation marks.

Three fixes, in order of preference

First, re-open the source with explicit UTF-8 encoding; most tools hide this option in an import dialog, and choosing it correctly restores everything instantly. Second, if only punctuation is damaged, find-and-replace the specific mojibake sequences back to their intended characters. Third, prevent recurrence by standardising on UTF-8 everywhere you control: exports, imports, and editor defaults.

Case conversion and cleanup tools operate on whatever characters arrive, so repair the encoding first, then tidy casing and duplicates; doing it backwards bakes the garbage into your cleaned file.

Worth knowing before you start

  • If characters show as empty boxes or question marks instead of symbol sequences, the data may be truly lost, not just misread.
  • Back up the corrupted-looking file before experimenting; opening and re-saving in the wrong encoding can destroy the original bytes.
  • JSON and web files should declare UTF-8 explicitly to prevent repeat incidents.

Frequently asked questions

Can mojibake always be reversed?
Usually yes, if the original bytes survive and only the interpretation was wrong. Repeated re-saves through wrong encodings progressively destroy information, so earlier intervention preserves more.
Does this affect uppercase/lowercase conversion?
Conversion works on decoded characters, so correctly-encoded text converts cleanly regardless of accents. Mojibake should be fixed first simply so you are converting the real text.
All questions →
All guides →
All articles →