mtr icon indicating copy to clipboard operation
mtr copied to clipboard

Reconsider information for the separator usage with the CSV output format

Open elfring opened this issue 3 years ago • 2 comments

Different information was published.

  1. 2017-02-04: Implementation of the function “csv_close” https://github.com/traviscross/mtr/blob/5c8cc179bc6a7b01d1a8b17bef42a7695c46ac72/ui/report.c#L464
  2. 2015-06-29: manual https://github.com/traviscross/mtr/blob/7f2d11ed1803d91274c33d6fcb47279d57a260a3/mtr.8#L223

How would you like to fix this situation? :thinking:

elfring avatar Sep 10 '22 17:09 elfring

The easiest fix is to remove the note. For those using mtr in scripts in the csv mode, it would be annoying to change it to follow the documentation.

In many cases, other separators are useful. e.g. when I export a bill-of-materials for a PCB design it will list 100nF, 0805, "C1, C2, C3" But although spreadsheets know how to parse that, it is difficult for "awk". So using semicolons because data can include commas is useful. I don't think the data can include commas in mtr output, so using a semicolon is not very useful.

If you want to change the code anyway, I suggest you allow to set it using an option and make the default a comma.

rewolff avatar Sep 11 '22 07:09 rewolff

I don't think the data can include commas in mtr output, …

Can such data display be adjusted according to decimal separator settings? :thinking:

elfring avatar Sep 11 '22 08:09 elfring