Excel not recognize automatically generated CSV files using utf-8 encoding

According to this post, writing a BOM at the beginning of the file will cause Excel 2007 or later to automatically treat a CSV file as UTF8:

https://stackoverflow.com/questions/155097/microsoft-excel-mangles-diacritics-in-csv-files

In Julia, do write(file, [0xef,0xbb,0xbf]) at the beginning of the file, before you write the CSV data.

2 Likes