Excel: Change default encoding (file origin) of Text Import Wizard to UTF-8 (65001 : Unicode)

character encodingmicrosoft excelutf-8

I am using a variety of tools to regularly prepare data for the web. One stage requires me to open a CSV in Excel, make changes and save the file.

Is there a way to force Excel to accept UTF-8 encoding, and to save its files with that encoding?

Best Answer

I answered a similar question at Default character encoding for Excel Text Wizard?.

I found my answer at Changing default text import origin type in Excel.

  1. Close Excel, if it is open.
  2. Open the Registry Editor.
  3. Navigate to HKEY_CURRENT_USER → Software → Microsoft → Office → ▒▒ → Excel → Options, where ▒▒ is your version of Office, mostly likely the largest number you see there.
  4. Right-click an empty space on the right side and select New → DWORD.
  5. Name the item DefaultCPG, and press Enter to save.
  6. Right-click on DefaultCPG and select Modify.
  7. Set the Base to Decimal.
  8. For Value data, enter 65001 to set your default to UTF-8. For some other encoding, use the code page identifier, which you can find in the Text Import Wizard in Excel or in this list.
  9. Click OK.

Like Vasille says in the comment to this question, if your file is not actually in UTF-8 format, you may technically want to convert the characters within the file to the encoding you want before opening in Excel. For my purposes, though, UTF-8 does a good enough job of displaying non-corrupted characters.

Not working? Make sure you set Base to Decimal (Step 7).

Screenshot of Edit DWORD 32-bit value showing setting base to decimal

Related Question