Komma

Fix garbled CSV text on Mac: UTF-8, BOM and other encodings

If CSV text is garbled, keep the original and reopen a copy using its actual encoding. Choosing an encoding for reading and converting the file for another system are different steps; make the text readable before exporting it.

By Komma · Reviewed: · Documentation and sample values reviewed

Identify the kind of problem

Unreadable accented characters or Japanese text can indicate an encoding mismatch. Readable text packed into a single column points instead to a delimiter problem. Missing leading zeros usually involve numeric conversion.

Do not overwrite the original while experimenting. If the exporting system specifies UTF-8, Shift-JIS or another encoding, start with that information rather than guessing from the appearance of the text.

Choose an import encoding in Numbers

  1. Open a copy in Numbers and select the table before editing cells.
  2. In Format → Table, choose Adjust Import Settings.
  3. Set Text Encoding to the source encoding, then update the table.

Apple notes that import settings cannot be adjusted after editing the imported table. If you have already edited it, start again with a copy of the original. See Apple’s import instructions.

Compare the same text in three files

These synthetic samples contain identical characters encoded differently. Correct decoding produces three rows including the header, with two columns. The product names are りんご (apple) and ノート (notebook).

商品,数量
りんご,2
ノート,3

The example uses characters representable in both encodings. Emoji and some other characters cannot be represented in Shift-JIS. Also, Shift-JIS and Windows CP932 are not identical; passing this small example does not establish support for every Japanese CSV.

Decode correctly before converting

Reading with an encoding interprets the existing bytes. Converting to UTF-8 writes the decoded characters as new bytes. Saving already garbled text as UTF-8 does not recover the intended characters.

Check names against the source, then export a CSV using the destination’s requirements. A BOM can help identify UTF-8, but whether to include it depends on the receiving system. Microsoft describes both BOM and import-based approaches in its UTF-8 CSV guidance for Excel.

When changing the encoding does not help

If question marks or replacement characters have already been saved over the original text, a different decoder cannot recreate the missing characters. Get a fresh export or return to a copy made before the damage. Compare names with the source system instead of replacing them with plausible guesses.

Back to CSV editing guides