What Is UTF-8 Encoding? A Plain-Language Guide
UTF-8 explained for data workers: why encodings exist, where mojibake like 'José' comes from, and how to detect and fix encoding in CSV files.
Computers store characters as numbers. An encoding is the agreement about which number means which character. UTF-8 is the modern universal agreement — it covers every language, emoji included — while dozens of legacy encodings (Windows-1252, ISO-8859-1, Shift-JIS) each cover a subset with different number assignments.
Why files arrive in the wrong encoding
CSV is plain text and carries no label saying "I am Windows-1252." When an old Windows system exports using its default code page and a modern tool reads it as UTF-8, every byte outside basic ASCII misinterprets. The result is mojibake: José becomes José, € becomes €, smart quotes become ’.
The tell-tale sign of double-encoded text is sequences like é, ü, †— each legacy byte reinterpreted as the start of a multi-byte UTF-8 sequence.
Detecting encoding
You cannot reliably detect encoding from content alone, but symptoms narrow it down:
- Accented letters mangled exactly once → source was Windows-1252 read as UTF-8.
- Question marks or boxes → lossy conversion already happened upstream; original bytes are gone.
- Fine on screen, broken only in Excel → likely missing BOM rather than wrong encoding (see what is a BOM).
Fixing it
If the file still has its original encoding, Fix Encoding re-reads it as Windows-1252 (or another source you choose) and saves clean UTF-8. If the damage is already baked into the bytes, repair tools cannot invent the lost information — you need the original export again. That is why the first rule of encoding problems is: go back to the source before converting.
Our step-by-step walkthrough with screenshots-level detail lives in fix CSV encoding issues.
One habit to adopt
Whatever tool produced your CSV, find its "export options" and force UTF-8 at the source. Every downstream conversion you avoid is a bug class you never meet.
The encodings you will actually meet
| Encoding | Where it comes from | Signature symptom |
|---|---|---|
| UTF-8 | Modern default everywhere | Renders correctly (or shows BOM issues) |
| Windows-1252 / "ANSI" | Legacy Windows exports, older ERP systems | Accents become é, € |
| ISO-8859-1 / Latin-1 | Older Unix and web forms | Similar mojibake, subtly different byte map |
| Shift-JIS | Japanese legacy systems | Garbled kana unless decoded explicitly |
Windows-1252 and Latin-1 overlap heavily but differ in a handful of bytes — the smart-quote range — which is why some files decode "almost" right and why guessing produces files that work until one curly apostrophe appears.
A repair flow that avoids making things worse
- Preserve the original. Copy the file; never experiment on the only copy.
- Identify the source system: old Windows export → try Windows-1252 first.
- Decode deliberately: Fix Encoding lets you name the source encoding instead of letting the browser guess.
- Verify against known values: check three cells containing accents against what they should say. Right? Proceed. Wrong? Try the next candidate encoding.
- Save canonical UTF-8 and treat it as read-only upstream of every consumer.
When the data is already destroyed
Mojibake that has been re-saved by an intermediate tool is usually unrecoverable — the original bytes were overwritten with replacement characters (? or �). No converter reconstructs information that was discarded. This is why encoding problems get cheaper the earlier they are caught, and why diagnose CSV file errors puts encoding checks before structural ones: it is the difference between a ten-second conversion and asking the vendor for a fresh export.
Related Articles
CSV Line Endings: CRLF vs LF (and Why Imports Complain)
Windows CRLF, Unix LF, and old Mac CR line endings explained — how mixed endings break row counts, and how to normalize a CSV before importing.
Looking for a CSVJSON Alternative? A Privacy-First Option
Comparing CSVJSON-style converter tools with HappyCSV: privacy, file size limits, batch processing, and which tool fits JSON-to-CSV, CSV-to-JSON, and SQL workflows.
Fixed-Width vs CSV: What Fixed-Column Files Are and How to Convert
Fixed-width files explained: columns defined by character positions instead of delimiters, where they still appear, and how to convert them to CSV safely.
Continue with HappyCSV
Choose a focused browser-based tool for the next step in your workflow.