Bug 121880 - Set semicolon ; as default Field Delimiter for CSV instead of comma , (avoid confusion for French and other)
Summary: Set semicolon ; as default Field Delimiter for CSV instead of comma , (avoid ...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://help.libreoffice.org/6.3/en-U...
Whiteboard:
Keywords: easyHack
: 133805 (view as bug list)
Depends on:
Blocks: CSV-Export
  Show dependency treegraph
 
Reported: 2018-12-03 14:24 UTC by gwenn.boussard
Modified: 2020-11-20 07:49 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
french coded float example (7.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-12-10 14:58 UTC, gwenn.boussard
Details
Example of fench coded float as a string (898.62 KB, text/csv)
2018-12-10 14:59 UTC, gwenn.boussard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gwenn.boussard 2018-12-03 14:24:24 UTC
Description:
When using LO in French, floats are expressed with a comma '3,14'.
When exporting to csv format, if you chose the comma separator at export, the file generated can't be parsed (impossible to decide a comma is either a field separator, or within a float).
The turn-around is to first set the column to 'english(US)' (format cells > Number > Language), but it's an ugly hack (export only should be affected, and it's hard to find).

Floats should be automatically coded with a dot in csv exports, at least when using comma as a separator.


Steps to Reproduce:
1.Set a sheet to French
2.Insert two floats into the first cells
3.Export to csv using comma a a separator
4.Open the generated csv

Actual Results:
Too many fields detected

Expected Results:
(N-1) commas on each line (N is the number of fields)


Reproducible: Always


User Profile Reset: No



Additional Info:
Code floats with dots.
Comment 1 Oliver Brinzing 2018-12-03 18:08:31 UTC Comment hidden (obsolete)
Comment 2 gwenn.boussard 2018-12-10 14:58:33 UTC
Created attachment 147421 [details]
french coded float example
Comment 3 gwenn.boussard 2018-12-10 14:59:19 UTC
Created attachment 147422 [details]
Example of fench coded float as a string
Comment 4 gwenn.boussard 2018-12-10 15:01:24 UTC
I feel a bit stupid, as I can't reproduce the exact same problem.
Nevertheless see attached files, the "french-coded" float is expressed as a string (with: '), which is still a(nother) problem.
Comment 5 Timur 2018-12-24 18:03:44 UTC
Save as CSV gives Export Text File options dialog with Field Delimiter.
Doesn't make sense to use the default "," (if that's what you meant by "if you chose the comma separator at export..").
I wouldn't agree with "Actual Results" or "Expected Results" as you wrote. It would be hard to put conditions to avoid user mistake. 
So this is WontFix as requested. 

But I think this request can be changed to "Set semicolon as default Field Delimiter for CSV instead of comma." I'll confirm so. 
Not sure why comma is default all the way from OO.
Comment 6 Timur 2020-04-01 16:32:00 UTC
*** Bug 127938 has been marked as a duplicate of this bug. ***
Comment 7 Timur 2020-06-23 15:14:31 UTC
*** Bug 133805 has been marked as a duplicate of this bug. ***
Comment 8 Roman Kuznetsov 2020-11-19 10:43:37 UTC
possibly it's an easyhack, but where is a code point here?
Comment 9 Mike Kaganski 2020-11-19 10:54:38 UTC
No idea why *Comma* Separated Values format must use semicolon instead of comma by default. Even if that's a possible extension.

And not sure what the description has to do with the request: if our import doesn't automatically mask all occurrences of separator symbol it its exported values, there's a bug in the export code, which needs fixing.
Comment 10 Mike Kaganski 2020-11-20 07:37:05 UTC
(In reply to Mike Kaganski from comment #9)
> if our import doesn't automatically mask all occurrences of separator symbol

A thinko; should had been "if our *export* doesn't automatically mask ..."

Just tested with my Russian locale that also uses comma as decimal separator: on export, it automatically encloses all numbers with commas into double quotes, as RFC 4180 section 2.6 prescribes.

So cells like

> |  A   |  B   |
> | 3.14 | 5.67 |

become in CSV:

> "3,14","5,67"

... as expected, and are parsed fine. So I can't reproduce the problem described in the issue, using Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL
Comment 11 Mike Kaganski 2020-11-20 07:49:55 UTC
Closing WONTFIX for both the original report in comment 0, and for proposed easyhack in comment 5.

Answering the "Not sure why comma is default all the way from OO": because it's standard both for the original CSV idea (as reflected in the name's "C"), and for RFC 4180.