CSV encoding vs Excel

|

A really smart way to lose 15 minutes of work is to start with a CSV file in UTF-8 without the Byte Order Marker. You then import it into Excel and start messing with it, and it’s not until halfway into it that you realize your UTF-8 data is all garbled up because Excel interpreted it as Latin1. And because most of your file is still ASCII, you didn’t realize it right away.

Solution? Make sure you go over your text input with a decent editor (SciTE is good — w00t — they’ve released many versions since I last updated — upgrade time), and specify correct encoding and save, before using it in Excel. Just fire up file in SciTE, go File - Encoding - UTF-8 - Save, and you’re done. BOM is now properly in your file and Excel plays nice with it.

1 Comments

I know many people who get paid for losing their lifetime in the same manner :) Funny story, thanks!

Leave a comment