discogs-xml2db icon indicating copy to clipboard operation
discogs-xml2db copied to clipboard

Change CSV delimiter and quotes

Open kliclick opened this issue 5 years ago • 1 comments

Hi, maybe it could be nice to change the CSV delimiters. The comma delimiter is often used in names, notes, titles, etc. This leads to bad structured csv files. The same observation about double quotes. For me the best format is a tab separated file without quotes because there's almost no confusion with such characters in the fileds contents. Maybe an improvement is to have 2 new options paramaters for the xml to csv export:

  1. Delimiter (tab, comma, semicolon, maybe user-defined)
  2. Quotes (single quotes, double quotes, none)

kliclick avatar Oct 16 '20 12:10 kliclick

Not opposed to having alternate separators, but I want to correct this part:

The comma delimiter is often used in names, notes, titles, etc. This leads to bad structured csv files. The same observation about double quotes.

CSV format addresses this concern: if any fields contain comma, they're encapsulated in quotes; if any field contains quotes, then that field is also encapsulated in quotes and the quotes inside are doubled. Similar for new lines.

As far as I know, discogsxml2db produces well-formatted CSV files. If you encounter a situation where that does not hold true, please file a bug report.

philipmat avatar Oct 16 '20 12:10 philipmat