On Tue, Oct 22, 2013 at 6:57 PM, Klaus Post <
klau...@gmail.com> wrote:
> Anyway, if you want it to work automatically in Excel include a BOM marker.
> If you don't care about international characters or you have other concerns,
> don't.
>
I learned the hard way that Excel is even more broken than that. If
you do include a BOM then try to save the same csv from Excel, it
saves it as a "text" document with _tab_ separators instead of commas
by default. If you select CSV from the Save As dialog, it converts all
non-ASCII characters to question marks.
The worst part is that no combination of encoding and BOM will make
CSV files work in Excel in a sane way, see this Stack Overflow
question:
http://stackoverflow.com/questions/6588068/which-encoding-opens-csv-files-correctly-with-excel-on-both-mac-and-windows
If you care about non-ASCII characters, I think the best option is to
save it as UTF-8 without BOM and tell the users to open it in a
non-broken program (LibreOffice, Google Docs, etc).