CSV with comma or semicolon?

csv
membersound picture membersound · Apr 13, 2012 · Viewed 232.9k times · Source

How is a CSV file built in general? With commas or semicolons? Any advice on which one to use?

Answer

Sibster picture Sibster · Apr 13, 2012

In Windows it is dependent on the "Regional and Language Options" customize screen where you find a List separator. This is the char Windows applications expect to be the CSV separator.

Of course this only has effect in Windows applications, for example Excel will not automatically split data into columns if the file is not using the above mentioned separator. All applications that use Windows regional settings will have this behavior.

If you are writing a program for Windows that will require importing the CSV in other applications and you know that the list separator set for your target machines is ,, then go for it, otherwise I prefer ; since it causes less problems with decimal points, digit grouping and does not appear in much text.