mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
A `;`-separated CSV (the usual CSV where `,` is the decimal separator) was rewritten with `,` on save: read_csv sniffed the delimiter but the result was dropped, and save_bytes passed a hard-coded b','. file.save, Save As .csv, file.exportCsv, file.saveBytes and gridcraft-cli convert all went through it. The workbook now remembers the separator it was read with (Workbook::csv_delimiter, set by read_csv) and a CSV save writes it back. Workbooks not read from CSV, and .tsv/.txt sources saved as .csv, keep `,`. Regression tests: `;`, `,` and tab .csv round trips byte for byte, new and .xlsx-origin workbooks save with `,`, and open-by-path + edit + file.save on a `;` file keeps `;` (also through exportCsv and saveBytes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>