Fix the accents of a CSV opened in Excel
The CSV opens, and "Café" has become "Café". The file is not damaged: Excel read it in the wrong encoding. The danger is saving it that way.
In Excel, step by step
Don't save
Close without saving: as long as the file is not rewritten, the characters are intact inside it.
Import instead of opening
Data, From Text/CSV, pick the file, then "File Origin: 65001: Unicode (UTF-8)".
Check the delimiter
In the same window, choose comma or semicolon until the columns separate, then Load.
Pitfalls
- Saving the file after opening it wrongly writes the "é" into the file: it then has to be fixed character by character.
- A file can be broken twice ("Ãâ©") if it went back and forth several times.
- Leading zeros of codes (00123) disappear if the column is read as a number.
Faster, on the whole file
Fix a CSV recognises the encoding, fixes characters already broken (even twice), finds the delimiter, and produces a CSV that Excel opens right the first time, or an XLSX workbook.
Frequently asked questions
- Why does Excel get the encoding wrong?
- A CSV does not state its encoding. Without a marker at the start of the file, Excel assumes the Windows one (Windows-1252), and a UTF-8 file is misread.